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:24:27 UTC
incubator-ariatosca git commit:
ARIA-136-ctx-binary-doesnt-get-installed-via-pip-install
Repository: incubator-ariatosca
Updated Branches:
refs/heads/ARIA-136-ctx-binary-doesnt-get-installed-via-pip-install [created] 6fb177e74
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/6fb177e7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/6fb177e7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/6fb177e7
Branch: refs/heads/ARIA-136-ctx-binary-doesnt-get-installed-via-pip-install
Commit: 6fb177e745c5f706f19daaee596a1f7d0039c38c
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:24:20 2017 +0300
----------------------------------------------------------------------
setup.py | 49 ++++++++++++++++++++++++++++++++++++++-----------
1 file changed, 38 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/6fb177e7/setup.py
----------------------------------------------------------------------
diff --git a/setup.py b/setup.py
index 7be5275..cd375c4 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,45 @@ 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 c(object):
+
+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 +142,7 @@ setup(
'console_scripts': console_scripts
},
cmdclass={
- 'install': InstallCommand
+ 'install': InstallCommand,
+ 'develop': DeveloperCommand
}
)