Skip to content

Commit

Permalink
Force reinstall dependencies if using venv (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
sloretz authored Jan 3, 2019
1 parent cd00968 commit ec3050a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ros2_batch_job/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,13 @@ def run(args, build_function, blacklisted_package_names=None):
job.run(
['"%s"' % job.python, '-m', 'pip', 'uninstall', '-y'] +
colcon_packages, shell=True)

pip_cmd = ['"%s"' % job.python, '-m', 'pip', 'install', '-U']
if args.do_venv:
# Force reinstall so all dependencies are in virtual environment
pip_cmd.append('--force-reinstall')
job.run(
['"%s"' % job.python, '-m', 'pip', 'install', '-U'] + pip_packages,
pip_cmd + pip_packages,
shell=True)

# OS X can't invoke a file which has a space in the shebang line
Expand Down

0 comments on commit ec3050a

Please sign in to comment.