ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mxm...@apache.org
Subject [01/13] incubator-ariatosca git commit: ARIA-95-pip-wheel-for-aria-ignores-dependencies [Forced Update!]
Date Thu, 16 Feb 2017 14:33:13 GMT
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-79-concurrent-storage-modifications b77070899 -> 5af1a8f23 (forced update)


ARIA-95-pip-wheel-for-aria-ignores-dependencies


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/4cfbe343
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/4cfbe343
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/4cfbe343

Branch: refs/heads/ARIA-79-concurrent-storage-modifications
Commit: 4cfbe34374659c2601bcbcf42e5ef2788ece7f8b
Parents: 9b01654
Author: mxmrlv <mxmrlv@gmail.com>
Authored: Wed Feb 1 19:26:27 2017 +0200
Committer: mxmrlv <mxmrlv@gmail.com>
Committed: Wed Feb 1 19:27:34 2017 +0200

----------------------------------------------------------------------
 setup.py | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/4cfbe343/setup.py
----------------------------------------------------------------------
diff --git a/setup.py b/setup.py
index 36f84c9..2d1106d 100644
--- a/setup.py
+++ b/setup.py
@@ -17,7 +17,7 @@
 import os
 import sys
 
-from setuptools import setup, find_packages, Command
+from setuptools import setup, find_packages
 from setuptools.command.install import install
 
 _PACKAGE_NAME = 'aria'
@@ -38,11 +38,25 @@ version = '0.1.0'
 execfile(os.path.join(root_dir, _PACKAGE_NAME, 'VERSION.py'))
 
 
+install_requires = []
+extras_require = {}
+
+# We need to parse the requirements for the conditional dependencies to work for wheels and
+# standard installation
 try:
     with open(os.path.join(root_dir, 'requirements.txt')) as requirements:
-        install_requires = [requirement.strip() for requirement in requirements.readlines()]
+        for requirement in requirements.readlines():
+            if not requirement.strip().startswith('#'):
+                if ';' in requirement:
+                    package, condition = requirement.split(';')
+                    cond_name = ':{0}'.format(condition.strip())
+                    extras_require.setdefault(cond_name, [])
+                    extras_require[cond_name].append(package.strip())
+                else:
+                    install_requires.append(requirement.strip())
 except IOError:
     install_requires = []
+    extras_require = {}
 
 
 console_scripts = ['aria = aria.cli.cli:main']
@@ -50,7 +64,7 @@ console_scripts = ['aria = aria.cli.cli:main']
 
 class InstallCommand(install):
     user_options = install.user_options + [
-        ('skip-ctx', None, 'Install with or without the ctx (Defaults to True')
+        ('skip-ctx', None, 'Install with or without the ctx (Defaults to False')
     ]
     boolean_options = install.boolean_options + ['skip-ctx']
 
@@ -95,6 +109,7 @@ setup(
     },
     zip_safe=False,
     install_requires=install_requires,
+    extras_require=extras_require,
     entry_points={
         'console_scripts': console_scripts
     },


Mime
View raw message