Skip to content

Commit

Permalink
Lock down pip version
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbovbel committed May 1, 2018
1 parent 0326643 commit 911df87
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions catkin_virtualenv/cmake/build_venv.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def delete_bytecode(directory):
package=os.path.basename(root_dir),
requirements_filename=args.requirements,
upgrade_pip=True,
pip_version=9.0.3,
use_system_packages=True,
python=find_executable('python3') if args.python3 else find_executable('python2'),
extra_pip_arg=['-qqq'],
Expand Down
7 changes: 5 additions & 2 deletions catkin_virtualenv/src/dh_virtualenv/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def __init__(self,
preinstall=[],
pip_tool='pip',
upgrade_pip=False,
pip_version=None,
index_url=None,
setuptools=False,
python=None,
Expand Down Expand Up @@ -74,6 +75,7 @@ def __init__(self,

self.preinstall = preinstall
self.upgrade_pip = upgrade_pip
self.pip_version = pip_version
self.extra_virtualenv_arg = extra_virtualenv_arg
self.verbose = verbose
self.setuptools = setuptools
Expand Down Expand Up @@ -182,8 +184,9 @@ def install_dependencies(self):
# by default virtualenv.
if self.upgrade_pip:
# First, bootstrap pip with a reduced option set (well-supported options)
print(self.pip_preinstall_prefix + self.pip_upgrade_args + ['-U', 'pip'])
subprocess.check_call(self.pip_preinstall_prefix + self.pip_upgrade_args + ['-U', 'pip'])
pip_package = 'pip=='.format(self.pip_version) if self.pip_version else 'pip'
print(self.pip_preinstall_prefix + self.pip_upgrade_args + ['-U', pip_package])
subprocess.check_call(self.pip_preinstall_prefix + self.pip_upgrade_args + ['-U', pip_package])
if self.preinstall:
subprocess.check_call(self.pip_preinstall(*self.preinstall))

Expand Down

0 comments on commit 911df87

Please sign in to comment.