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/04/02 16:26:07 UTC
incubator-ariatosca git commit:
ARIA-136-ctx-binary-doesnt-get-installed-via-pip-install [Forced Update!]
Repository: incubator-ariatosca
Updated Branches:
refs/heads/ARIA-136-ctx-binary-doesnt-get-installed-via-pip-install 6fb177e74 -> 4042c9a4a (forced update)
ARIA-136-ctx-binary-doesnt-get-installed-via-pip-install
Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/4042c9a4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/4042c9a4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/4042c9a4
Branch: refs/heads/ARIA-136-ctx-binary-doesnt-get-installed-via-pip-install
Commit: 4042c9a4a59177ab07eeeeec569c2bff78ee59fc
Parents: 2d83475
Author: max-orlov <ma...@gigaspaces.com>
Authored: Sun Apr 2 19:24:20 2017 +0300
Committer: max-orlov <ma...@gigaspaces.com>
Committed: Sun Apr 2 19:26:02 2017 +0300
----------------------------------------------------------------------
setup.py | 47 ++++++++++++++++++++++++++++++++++++-----------
1 file changed, 36 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/4042c9a4/setup.py
----------------------------------------------------------------------
diff --git a/setup.py b/setup.py
index 7be5275..0f9123b 100644
--- a/setup.py
+++ b/setup.py
@@ -19,6 +19,7 @@ import sys
from setuptools import setup, find_packages
from setuptools.command.install import install
+from setuptools.command.develop import develop
_PACKAGE_NAME = 'aria'
_PYTHON_SUPPORTED_VERSIONS = [(2, 6), (2, 7)]
@@ -63,20 +64,43 @@ except IOError:
console_scripts = ['aria = aria.cli.cli:main']
-class InstallCommand(install):
- user_options = install.user_options + [
+def _generate_user_options(command):
+ return command.user_options + [
('skip-ctx', None, 'Install with or without the ctx (Defaults to False)')
]
- 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)
+def _generate_boolean_options(command):
+ return command.boolean_options + ['skip-ctx']
+
+
+def _initialize_options(custom_cmd):
+ custom_cmd.command.initialize_options(custom_cmd)
+ custom_cmd.skip_ctx = False
+
+
+def _run(custom_cmd):
+ if custom_cmd.skip_ctx is False:
+ console_scripts.append('ctx = aria.orchestrator.execution_plugin.ctx_proxy.client:main')
+ custom_cmd.command.run(custom_cmd)
+
+
+class InstallCommand(install):
+ command = install
+
+ user_options = _generate_user_options(install)
+ boolean_options = _generate_boolean_options(install)
+ initialize_options = _initialize_options
+ run = _run
+
+
+class DeveloperCommand(develop):
+ command = develop
+
+ user_options = _generate_user_options(develop)
+ boolean_options = _generate_boolean_options(develop)
+ initialize_options = _initialize_options
+ run = _run
setup(
name=_PACKAGE_NAME,
@@ -116,6 +140,7 @@ setup(
'console_scripts': console_scripts
},
cmdclass={
- 'install': InstallCommand
+ 'install': InstallCommand,
+ 'develop': DeveloperCommand
}
)