[h5py] 326/455: Enable Cython profiling

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:19:47 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 b44f27356d6449cf5b27f76187f95ad244367fae
Author: andrewcollette <andrew.collette at gmail.com>
Date:   Wed Nov 25 03:22:11 2009 +0000

    Enable Cython profiling
---
 h5py/_conv.pyx  | 2 ++
 h5py/_proxy.pyx | 2 ++
 h5py/h5.pyx     | 2 ++
 h5py/utils.pyx  | 2 ++
 setup.py        | 9 ++++++---
 5 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/h5py/_conv.pyx b/h5py/_conv.pyx
index 772b19e..e669fcd 100644
--- a/h5py/_conv.pyx
+++ b/h5py/_conv.pyx
@@ -1,3 +1,5 @@
+# cython: profile=False
+
 #+
 # 
 # This file is part of h5py, a low-level Python interface to the HDF5 library.
diff --git a/h5py/_proxy.pyx b/h5py/_proxy.pyx
index 40bf7e7..7bb04c5 100644
--- a/h5py/_proxy.pyx
+++ b/h5py/_proxy.pyx
@@ -1,3 +1,5 @@
+# cython: profile=False
+
 #+
 # 
 # This file is part of h5py, a low-level Python interface to the HDF5 library.
diff --git a/h5py/h5.pyx b/h5py/h5.pyx
index 5527563..a2725e6 100644
--- a/h5py/h5.pyx
+++ b/h5py/h5.pyx
@@ -1,3 +1,5 @@
+# cython: profile=False
+
 #+
 # 
 # This file is part of h5py, a low-level Python interface to the HDF5 library.
diff --git a/h5py/utils.pyx b/h5py/utils.pyx
index fdc9c17..57f99d0 100644
--- a/h5py/utils.pyx
+++ b/h5py/utils.pyx
@@ -1,3 +1,5 @@
+# cython: profile=False
+
 #+
 # 
 # This file is part of h5py, a low-level Python interface to the HDF5 library.
diff --git a/setup.py b/setup.py
index 1b89544..8fb3fe2 100644
--- a/setup.py
+++ b/setup.py
@@ -28,7 +28,7 @@ import pickle
 NAME = 'h5py'
 VERSION = '1.2.2'
 MIN_NUMPY = '1.0.3'
-MIN_CYTHON = '0.11.2'
+MIN_CYTHON = '0.12'
 SRC_PATH = 'h5py'           # Name of directory with .pyx files
 
 USE_DISTUTILS = False
@@ -304,15 +304,17 @@ class cython(Command):
     user_options = [('api16', '6', 'Only build version 1.6'),
                     ('api18', '8', 'Only build version 1.8'),
                     ('force', 'f', 'Bypass timestamp checking'),
-                    ('clean', 'c', 'Clean up Cython files')]
+                    ('clean', 'c', 'Clean up Cython files'),
+                    ('profile', 'p', 'Enable Cython profiling')]
 
-    boolean_options = ['force', 'clean']
+    boolean_options = ['force', 'clean', 'profile']
 
     def initialize_options(self):
         self.api16 = None
         self.api18 = None
         self.force = False
         self.clean = False
+        self.profile = False
 
     def finalize_options(self):
         if not (self.api16 or self.api18):
@@ -378,6 +380,7 @@ DEF H5PY_18API = %(API_18)d    # 1.8.X API available
 
                     debug("Cythoning %s" % pyx_path)
                     result = compile(pyx_path, verbose=False,
+                                     compiler_directives = {'profile': self.profile},
                                      include_path=[outpath], output_file=c_path)
                     if result.num_errors != 0:
                         fatal("Cython error; aborting.")

-- 
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