diff --git a/ros_buildfarm/scripts/release/generate_release_script.py b/ros_buildfarm/scripts/release/generate_release_script.py index 4dd019c89..06031d0a9 100644 --- a/ros_buildfarm/scripts/release/generate_release_script.py +++ b/ros_buildfarm/scripts/release/generate_release_script.py @@ -16,8 +16,23 @@ import re import sys -from em import BANGPATH_OPT -from em import Hook +try: + # Import bangpath option name from EmPy v3 + from em import BANGPATH_OPT + BANGPATH_VALUE = False +except ImportError: + # EmPy 4 does not define an import-able constant for the updated bangpath + # option and inverts its meaning. + BANGPATH_OPT = 'ignoreBangpaths' + BANGPATH_VALUE = True + + +try: + from em import Hook +except: + from emlib import Hook + + from ros_buildfarm.argument import add_argument_arch from ros_buildfarm.argument import add_argument_build_name from ros_buildfarm.argument import add_argument_config_url @@ -151,7 +166,7 @@ def beforeInclude(self, *args, **kwargs): 'source_scripts': source_scripts, 'binary_scripts': binary_scripts, 'package_format': package_format}, - options={BANGPATH_OPT: False}) + options={BANGPATH_OPT: BANGPATH_VALUE}) value = re.sub(r'(^| )python3 ', r'\1' + sys.executable + ' ', value, flags=re.M) print(value) diff --git a/ros_buildfarm/templates/snippet/builder_parameterized-trigger.xml.em b/ros_buildfarm/templates/snippet/builder_parameterized-trigger.xml.em index f919495c0..f59e6dd14 100644 --- a/ros_buildfarm/templates/snippet/builder_parameterized-trigger.xml.em +++ b/ros_buildfarm/templates/snippet/builder_parameterized-trigger.xml.em @@ -10,7 +10,7 @@ @[if parameter_files]@ @(','.join(ESCAPE(parameter_files))) - @(vars().get('missing_parameter_files_skip', False) ? 'true' : 'false') + @(vars().get('missing_parameter_files_skip', False) ? 'true' ! 'false') false false false diff --git a/setup.py b/setup.py index 3cdb734a5..af78f5af2 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ 'scripts': scripts, 'zip_safe': False, 'install_requires': [ - 'empy<4', + 'empy', 'PyYAML'], 'extras_require': { 'test': [