[h5py] 228/455: Remove obsolete components

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:19:36 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to annotated tag 1.3.0
in repository h5py.

commit fde496b227c193396f87df916722c68a903536fa
Author: andrewcollette <andrew.collette at gmail.com>
Date:   Fri Feb 13 23:41:13 2009 +0000

    Remove obsolete components
---
 meta/__init__.py      |   1 -
 meta/attrs.hdf5       | Bin 2240 -> 0 bytes
 meta/block.txt        |   9 -----
 meta/gen_attributes.c |  96 --------------------------------------------------
 meta/insertblock.py   |  81 ------------------------------------------
 5 files changed, 187 deletions(-)

diff --git a/meta/__init__.py b/meta/__init__.py
deleted file mode 100644
index b2ad2dc..0000000
--- a/meta/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-import insertblock
diff --git a/meta/attrs.hdf5 b/meta/attrs.hdf5
deleted file mode 100644
index c431d49..0000000
Binary files a/meta/attrs.hdf5 and /dev/null differ
diff --git a/meta/block.txt b/meta/block.txt
deleted file mode 100644
index 1b5f191..0000000
--- a/meta/block.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-
-This file is part of h5py, a low-level Python interface to the HDF5 library.
-
-Copyright (C) 2008 Andrew Collette
-http://h5py.alfven.org
-License: BSD  (See LICENSE.txt for full license)
-
-$Date$
-
diff --git a/meta/gen_attributes.c b/meta/gen_attributes.c
deleted file mode 100644
index b14c71c..0000000
--- a/meta/gen_attributes.c
+++ /dev/null
@@ -1,96 +0,0 @@
-
-/* Generate an HDF5 test file for attributes unit test. */
-
-#include "hdf5.h"
-
-int attributes(char* filename){
-    
-    char val1[] = "This is a string.";
-    int val2 = 42;
-    hsize_t val3_dims = 4;
-    int val3[4];
-    int val4 = -34;
-    
-    val3[0] = 0;
-    val3[1] = 1;
-    val3[2] = 2;
-    val3[3] = 3;
-
-    hid_t sid_scalar=0;
-    hid_t sid_array=0;
-    hid_t fid=0;
-    hid_t gid=0;
-    hid_t string_id=0;
-    hid_t aid=0;
-
-    int retval=1;
-
-    sid_scalar = H5Screate(H5S_SCALAR);
-    if(sid_scalar<0) goto out;
-
-    sid_array = H5Screate_simple(1, &val3_dims, NULL);
-    if(sid_array<0) goto out;
-
-    string_id = H5Tcopy(H5T_C_S1);
-    if(string_id<0) goto out;
-
-    if(H5Tset_size(string_id, 18)<0) goto out; /* string is 17 chars, plus NULL */
-
-    fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
-    if(fid<0) goto out;
-
-    gid = H5Gcreate(fid, "Group", -1);
-    if(gid<0) goto out;
-
-    /* 1: "String attribute", exactly 18 bytes with null terminator, scalar,
-          value "This is a string." */
-    aid = H5Acreate(gid, "String Attribute", string_id, sid_scalar, H5P_DEFAULT);
-    if(aid<0) goto out;
-    if(H5Awrite(aid, string_id, &val1) < 0) goto out;
-    if(H5Aclose(aid)<0) goto out;
-
-    /* 2: "Integer", 32-bit little-endian, scalar, value 42. */
-    aid = H5Acreate(gid, "Integer", H5T_STD_I32LE, sid_scalar, H5P_DEFAULT);
-    if(aid<0) goto out;
-    if(H5Awrite(aid, H5T_NATIVE_INT, &val2)<0) goto out;
-    if(H5Aclose(aid)<0) goto out;
-
-    /* 3: "Integer array", 4-element 32-bit little endian, value [0,1,2,3] */
-    aid = H5Acreate(gid, "Integer Array", H5T_STD_I32LE, sid_array, H5P_DEFAULT);
-    if(aid<0) goto out;
-    if(H5Awrite(aid, H5T_NATIVE_INT, &val3)<0) goto out;
-    if(H5Aclose(aid)<0) goto out;
-
-    /* 4: "Byte", 8-bit "little-endian" integer, value -34 */
-    aid = H5Acreate(gid, "Byte", H5T_STD_I8LE, sid_scalar, H5P_DEFAULT);
-    if(aid<0) goto out;
-    if(H5Awrite(aid, H5T_NATIVE_INT, &val4)<0) goto out;
-    if(H5Aclose(aid)<0) goto out;
-
-    if(H5Gcreate(gid, "Subgroup1", -1)<0) goto out;
-    if(H5Gcreate(gid, "Subgroup2", -1)<0) goto out;
-    if(H5Gcreate(gid, "Subgroup3", -1)<0) goto out;
-
-
-    retval = 0;  /* got here == success */
-
-    out:
-
-    if(sid_scalar) H5Sclose(sid_scalar);
-    if(sid_array)  H5Sclose(sid_array);
-    if(fid) H5Fclose(fid);
-    if(gid) H5Gclose(gid);
-    if(string_id) H5Tclose(string_id);
-
-    return retval;
-}
-
-int main(int argc, char **argv){
-
-    if(argc!=2) return 2;
-    return attributes(argv[1]);
-}
-
-
-
-    
diff --git a/meta/insertblock.py b/meta/insertblock.py
deleted file mode 100644
index 83e8423..0000000
--- a/meta/insertblock.py
+++ /dev/null
@@ -1,81 +0,0 @@
-import os
-
-python_mode = ('.py', '.pyx', '.pxd', '.pxi')
-c_mode = ('.c','.h')
-
-firstline = { 'python': "#+",
-              'c': "/*"+"*"*4 + " Preamble block " + "*"*57}
-
-lastline = { 'python': "#-",
-             'c': '*'*6 + " End preamble block " + '*'*52 +'/' }
-
-beginline = { 'python': '# ', 'c': '* ' }
-
-def guessmode(filename):
-    ext = os.path.splitext(filename)[1]
-    if ext in python_mode:
-        return 'python'
-    if ext in c_mode:
-        return 'c'
-    raise ValueError("Can't determine mode of %s" % filename)
-
-def iterblock(file_obj, mode, output_block=True):
-
-    in_block = False
-
-    for idx, line in enumerate(file_obj):
-        matchline = line.strip()
-
-        if matchline == firstline[mode]:
-            in_block = True
-            continue
-        elif matchline == lastline[mode]:
-            in_block = False
-            continue
-
-        if in_block == output_block:
-            yield line
-
-def printblock(filename):
-    fh = open(filename,'r')
-    try:
-        print "".join(iterblock(fh, guessmode(filename), True))
-    finally:
-        fh.close()
-    
-def replaceblock(filename, block_filename):
-    mode = guessmode(filename)
-    fh = open(filename,'r')
-
-    contents = list(iterblock(fh, mode, False))
-    fh.close()
-
-    fh_block = open(block_filename, 'r')
-    block_contents = list(fh_block)
-    fh_block.close()
-
-    contents =  [firstline[mode]+os.linesep] + \
-                [beginline[mode] + line for line in block_contents] + \
-                [lastline[mode]+os.linesep] + \
-                contents
-
-    fh = open(filename,'w')
-    fh.write("".join(contents))
-    fh.close()
-
-def eraseblock(filename):
-    try:
-        fh = open(filename,'r')
-    except IOError:
-        return
-    try:
-        contents = list(iterblock(fh, guessmode(filename),False))
-    finally:
-        fh.close()
-
-    fh = open(filename, 'w')
-    fh.write("".join(contents))
-    fh.close()
-
-
-

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/h5py.git



More information about the debian-science-commits mailing list