summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-08-01 00:31:18 +0000
committerGerrit Code Review <review@openstack.org>2013-08-01 00:31:18 +0000
commit3b82b9b9d06ff0e2cfd894e11bf246974fc78bbc (patch)
treef1f75fc9cdc83122264ca00101614abc14f1a2a4
parent600aa2a25052380e2010f8001c3185ad35d8a67d (diff)
parent68462dd62b73beccda3ae4cff2628ab3f157585f (diff)
downloadpbr-3b82b9b9d06ff0e2cfd894e11bf246974fc78bbc.tar.gz
Merge "Add skip_pip_install to setup.cfg"
-rw-r--r--pbr/packaging.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/pbr/packaging.py b/pbr/packaging.py
index 526b5c3..02b741a 100644
--- a/pbr/packaging.py
+++ b/pbr/packaging.py
@@ -79,8 +79,9 @@ def _make_links_args(links):
return ["-f '%s'" % link for link in links]
-def _pip_install(links, requires, root=None):
- if str(os.getenv('SKIP_PIP_INSTALL', '')).lower() in TRUE_VALUES:
+def _pip_install(links, requires, root=None, option_dict=dict()):
+ if get_boolean_option(
+ option_dict, 'skip_pip_install', 'SKIP_PIP_INSTALL'):
return
root_cmd = ""
if root:
@@ -326,10 +327,13 @@ class LocalInstall(install.install):
command_name = 'install'
def run(self):
+ option_dict = self.distribution.get_option_dict('pbr')
if (not self.single_version_externally_managed
and self.distribution.install_requires):
links = _make_links_args(self.distribution.dependency_links)
- _pip_install(links, self.distribution.install_requires, self.root)
+ _pip_install(
+ links, self.distribution.install_requires, self.root,
+ option_dict=option_dict)
return du_install.install.run(self)
@@ -362,7 +366,10 @@ class _PipInstallTestRequires(object):
links = _make_links_args(
parse_dependency_links(TEST_REQUIREMENTS_FILES))
if self.distribution.tests_require:
- _pip_install(links, self.distribution.tests_require)
+ option_dict = self.distribution.get_option_dict('pbr')
+ _pip_install(
+ links, self.distribution.tests_require,
+ option_dict=option_dict)
def pre_run(self):
self.egg_name = pkg_resources.safe_name(self.distribution.get_name())