Skip to content

Commit 13a1043

Browse files
authored
fix: merge install for python packages (#241)
1 parent 7181bea commit 13a1043

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

generate_parameter_library_py/generate_parameter_library_py/setup_helper.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232
from generate_parameter_library_py.generate_python_module import run
3333

3434

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

57+
if not install_base:
58+
install_base = os.path.join(colcon_ws, 'install')
59+
60+
install_base = (
61+
install_base if merge_install else os.path.join(install_base, pkg_name)
62+
)
5563
install_dir = os.path.join(
56-
colcon_ws,
57-
'install',
58-
pkg_name,
64+
install_base,
5965
'lib',
6066
py_version,
6167
'site-packages',

0 commit comments

Comments
 (0)