You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ariatosca.apache.org by mx...@apache.org on 2017/01/31 15:33:43 UTC
incubator-ariatosca git commit:
ARIA-81-Install-execution-plugin-ctx-entry-point-by-default
Repository: incubator-ariatosca
Updated Branches:
refs/heads/master 9e62fcacb -> 9b016543f
ARIA-81-Install-execution-plugin-ctx-entry-point-by-default
Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/9b016543
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/9b016543
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/9b016543
Branch: refs/heads/master
Commit: 9b016543f0dad2a2ca07e4d43e1194387c29f58d
Parents: 9e62fca
Author: mxmrlv <mx...@gmail.com>
Authored: Mon Jan 30 18:24:15 2017 +0200
Committer: mxmrlv <mx...@gmail.com>
Committed: Tue Jan 31 16:12:46 2017 +0200
----------------------------------------------------------------------
setup.py | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/9b016543/setup.py
----------------------------------------------------------------------
diff --git a/setup.py b/setup.py
index 5a3d016..36f84c9 100644
--- a/setup.py
+++ b/setup.py
@@ -17,7 +17,8 @@
import os
import sys
-from setuptools import setup, find_packages
+from setuptools import setup, find_packages, Command
+from setuptools.command.install import install
_PACKAGE_NAME = 'aria'
_PYTHON_SUPPORTED_VERSIONS = [(2, 6), (2, 7)]
@@ -45,10 +46,23 @@ except IOError:
console_scripts = ['aria = aria.cli.cli:main']
-if os.environ.get('INSTALL_CTX'):
- console_scripts.append('ctx = aria.orchestrator.execution_plugin.ctx_proxy.client:main')
+class InstallCommand(install):
+ user_options = install.user_options + [
+ ('skip-ctx', None, 'Install with or without the ctx (Defaults to True')
+ ]
+ boolean_options = install.boolean_options + ['skip-ctx']
+
+ def initialize_options(self):
+ install.initialize_options(self)
+ self.skip_ctx = False
+
+ def run(self):
+ if self.skip_ctx is False:
+ console_scripts.append('ctx = aria.orchestrator.execution_plugin.ctx_proxy.client:main')
+ install.run(self)
+
setup(
name=_PACKAGE_NAME,
version=version,
@@ -83,5 +97,8 @@ setup(
install_requires=install_requires,
entry_points={
'console_scripts': console_scripts
+ },
+ cmdclass={
+ 'install': InstallCommand
}
)