[h5py] 346/455: Improve setup autodetection
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:19:49 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 79624b52acc98ad6e52e5f4d3c47e34e27cd1b66
Author: andrewcollette <andrew.collette at gmail.com>
Date: Tue Jan 5 06:15:36 2010 +0000
Improve setup autodetection
---
setup.py | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/setup.py b/setup.py
index 0df4015..d097b93 100644
--- a/setup.py
+++ b/setup.py
@@ -279,8 +279,8 @@ class GlobalSettings(object):
from distutils import ccompiler
from distutils.core import CompileError, LinkError
- import commands
-
+ import subprocess
+
cc = ccompiler.new_compiler()
cc.libraries = self.libraries
cc.include_dirs = self.include_dirs
@@ -311,10 +311,12 @@ int main(){
cc.link_executable(objs, localpath('detect','h5vers.exe'))
except LinkError:
fatal("Can't link against HDF5.")
- status, output = commands.getstatusoutput(localpath('detect', 'h5vers.exe'))
- if status:
- fatal("Error running HDF5 version detection script:\n%s" % output)
- vmaj, vmin, vrel = (int(v) for v in output.split('.'))
+ result = subprocess.Popen(localpath('detect', 'h5vers.exe'),
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ so, se = result.communicate()
+ if result.returncode:
+ fatal("Error running HDF5 version detection script:\n%s\n%s" % (so,se))
+ vmaj, vmin, vrel = (int(v) for v in so.split('.'))
self._vers_cache = (vmaj, vmin, vrel)
return (vmaj, vmin, vrel)
--
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