summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-10-01 15:10:05 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-10-01 15:15:51 +0900
commit1396ddebd45bf6c14cc16e389c1fe1427ddf18cc (patch)
treeaa91cdc40a463ae91b9b1f77d4f461c978f3c467
parentaa67cb9100751f7bb817be32eecf2f9ceacf66f6 (diff)
downloadbuildstream-1396ddebd45bf6c14cc16e389c1fe1427ddf18cc.tar.gz
setup.py: Use env var instead of --install-option for the receiver install
Fixes the previous commits which attempt to allow optionally only installing bst-artifact-receive, which doesnt work, because pip.
-rwxr-xr-xsetup.py38
1 files changed, 11 insertions, 27 deletions
diff --git a/setup.py b/setup.py
index 5f27038ca..ef322a89a 100755
--- a/setup.py
+++ b/setup.py
@@ -114,38 +114,25 @@ def list_man_pages():
#####################################################
-# Custom Install Command #
+# Conditional Checks #
#####################################################
+#
+# Because setuptools... there is no way to pass an option to
+# the setup.py explicitly at install time.
+#
+# So screw it, lets just use an env var.
bst_install_entry_points = {
'console_scripts': [
'bst-artifact-receive = buildstream._artifactcache.pushreceive:receive_main'
],
}
-
-class BstInstallCommand(install):
- user_options = install.user_options + [
- ('artifact-receiver-only', None, "Only install the artifact receiver"),
+if not os.environ.get('BST_ARTIFACTS_ONLY', ''):
+ assert_bwrap()
+ assert_ostree_version()
+ bst_install_entry_points['console_scripts'] += [
+ 'bst = buildstream._frontend:cli'
]
- boolean_options = install.boolean_options + [
- 'artifact-receiver-only'
- ]
-
- def initialize_options(self):
- install.initialize_options(self)
- self.artifact_receiver_only = None
-
- def run(self):
- if not self.artifact_receiver_only:
-
- assert_bwrap()
- assert_ostree_version()
-
- bst_install_entry_points['console_scripts'] += [
- 'bst = buildstream._frontend:cli'
- ]
-
- install.run(self)
#####################################################
@@ -156,9 +143,6 @@ setup(name='BuildStream',
description='A framework for modelling build pipelines in YAML',
license='LGPL',
use_scm_version=True,
- cmdclass={
- 'install': BstInstallCommand,
- },
packages=find_packages(),
package_data={'buildstream': ['plugins/*/*.py', 'plugins/*/*.yaml',
'data/*.yaml', 'data/*.sh.in']},