Skip to content

fix: merge install for python packages #241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
from generate_parameter_library_py.generate_python_module import run


def generate_parameter_module(module_name, yaml_file, validation_module=''):
def generate_parameter_module(
module_name, yaml_file, validation_module='', install_base=None, merge_install=False
):
# TODO there must be a better way to do this. I need to find the build directory so I can place the python
# module there
build_dir = None
Expand All @@ -52,10 +54,14 @@ def generate_parameter_module(module_name, yaml_file, validation_module=''):
tmp = tmp.split('.')
py_version = f'python{tmp[0]}.{tmp[1]}'

if not install_base:
install_base = os.path.join(colcon_ws, 'install')

install_base = (
install_base if merge_install else os.path.join(install_base, pkg_name)
)
install_dir = os.path.join(
colcon_ws,
'install',
pkg_name,
install_base,
'lib',
py_version,
'site-packages',
Expand Down
Loading