[pytango] 65/122: Update requirements

Sandor Bodo-Merle sbodomerle-guest at moszumanska.debian.org
Thu Sep 28 19:18:19 UTC 2017


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

sbodomerle-guest pushed a commit to tag v9.2.1
in repository pytango.

commit b94f93f6e699722f581be322466be9ee89606461
Author: Vincent Michel <vincent.michel at maxlab.lu.se>
Date:   Wed Oct 12 16:26:33 2016 +0200

    Update requirements
---
 setup.py | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/setup.py b/setup.py
index bb3982a..43b84b4 100644
--- a/setup.py
+++ b/setup.py
@@ -45,6 +45,8 @@ POSIX = 'posix' in os.name
 WINDOWS = 'nt' in os.name
 IS64 = 8 * struct.calcsize("P") == 64
 PYTHON_VERSION = platform.python_version_tuple()
+PYTHON2 = ('2',) <= PYTHON_VERSION < ('3',)
+PYTHON3 = ('3',) <= PYTHON_VERSION < ('4',)
 
 # Linux distribution
 distribution = platform.linux_distribution()[0].lower() if POSIX else ""
@@ -53,6 +55,9 @@ DEBIAN = distribution_match(['debian', 'ubuntu', 'mint'])
 REDHAT = distribution_match(['redhat', 'fedora', 'centos'])
 GENTOO = distribution_match(['gentoo'])
 
+# Arguments
+TESTING = any(x in sys.argv for x in ['test', 'pytest'])
+
 
 def pkg_config(*packages, **config):
     config_map = {
@@ -353,7 +358,7 @@ def setup_args():
             suffix = "-py{v[0]}{v[1]}".format(v=PYTHON_VERSION)
             boost_library_name += suffix
         elif REDHAT:
-            if PYTHON_VERSION >= ('3',):
+            if PYTHON3:
                 boost_library_name += '3'
         elif GENTOO:
             suffix = "-{v[0]}.{v[1]}".format(v=PYTHON_VERSION)
@@ -418,11 +423,13 @@ def setup_args():
     ]
 
     setup_requires = [
-        'pytest-runner',
+        'pytest-runner' if TESTING else '',
     ]
 
     tests_require = [
         'pytest-xdist',
+        'gevent',
+        'trollius' if PYTHON2 else '',
     ]
 
     package_data = {

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