[pytango] 255/483: fixes #605 [pytango] use distutils.version module
Sandor Bodo-Merle
sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:14:47 UTC 2017
This is an automated email from the git hooks/post-receive script.
sbodomerle-guest pushed a commit to annotated tag bliss_8.10
in repository pytango.
commit e247ae5b348541fc5fe7e87d9e2a2c792f4bd64f
Author: tiagocoutinho <tiagocoutinho at 4e9c00fd-8f2e-0410-aa12-93ce3db5e235>
Date: Sat May 18 17:24:50 2013 +0000
fixes #605 [pytango] use distutils.version module
git-svn-id: http://svn.code.sf.net/p/tango-cs/code/bindings/PyTango/trunk@22684 4e9c00fd-8f2e-0410-aa12-93ce3db5e235
---
setup.py | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/setup.py b/setup.py
index 5047441..de3611f 100644
--- a/setup.py
+++ b/setup.py
@@ -34,6 +34,7 @@ from distutils.command.build import build as dftbuild
from distutils.command.build_ext import build_ext as dftbuild_ext
from distutils.command.install import install as dftinstall
from distutils.unixccompiler import UnixCCompiler
+from distutils.version import StrictVersion as V
import distutils.sysconfig
try:
@@ -47,8 +48,7 @@ except:
try:
import IPython
_IPY_ROOT = os.path.dirname(os.path.abspath(IPython.__file__))
- _IPY_VER = list(map(int, IPython.__version__.split(".")[:2]))
- if _IPY_VER > [0,10]:
+ if V(IPython.__version__) > V('0.10'):
import IPython.utils.path
get_ipython_dir = IPython.utils.path.get_ipython_dir
else:
@@ -184,8 +184,7 @@ class build(dftbuild):
return False
if sphinx is None:
return False
- v = list(map(int, sphinx.__version__.split(".")))
- if v <= [0,6,5]:
+ if V(sphinx.__version__) <= V("0.6.5"):
print("Documentation will not be generated: sphinx version (%s) too low. Needs 0.6.6" % sphinx.__version__)
return False
setup_dir = os.path.dirname(os.path.abspath(__file__))
@@ -208,9 +207,8 @@ class build_ext(dftbuild_ext):
import subprocess
compiler = self.compiler.compiler
pipe = subprocess.Popen(compiler + ["-dumpversion"], stdout=subprocess.PIPE).stdout
- gcc_ver = pipe.readlines()[0].decode().strip().split(".")
- gcc_ver = list(map(int, gcc_ver))
- if gcc_ver >= [4,0,0]:
+ gcc_ver = pipe.readlines()[0].decode().strip()
+ if V(gcc_ver) >= V("4.3.3"):
self.use_cpp_0x = True
dftbuild_ext.build_extensions(self)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pytango.git
More information about the debian-science-commits
mailing list