Skip to content

Commit

Permalink
Wrap binaries under install/lib/{PACKAGE}, not top level
Browse files Browse the repository at this point in the history
The current code was wrapping every binary located under
install/bin, which contains binaries from packages that may not
be related to ament_virtualenv at all. This was causing failures
due to the venv being used when it shouldn't.

In addition the use_system_packages was hard coded to false which
requires every single python package be within the venv, which is
not generally the case.
  • Loading branch information
jprestwo committed Jul 31, 2024
1 parent 8cbdec1 commit fbb8a69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ament_virtualenv/ament_virtualenv/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def find_program(name='build_venv.py', package='ament_virtualenv'):

def install_venv(install_base, package_name, python_version='3'):
venv_install_dir = os.path.join(install_base, 'venv')
bin_dir = os.path.join(install_base, 'bin')
bin_dir = os.path.join(install_base, 'lib', package_name)
#
# Build the virtual environment
python = shutil.which("python3")
Expand Down Expand Up @@ -148,7 +148,7 @@ def install_venv(install_base, package_name, python_version='3'):
root_dir=venv_install_dir,
python_version=python_version,
requirements_filename=generated_requirements,
use_system_packages=False,
use_system_packages=True,
extra_pip_args="-qq",
retries=3
)
Expand Down

0 comments on commit fbb8a69

Please sign in to comment.