diff --git a/ros2_batch_job/__main__.py b/ros2_batch_job/__main__.py index 9f96ae60a..1599864c4 100644 --- a/ros2_batch_job/__main__.py +++ b/ros2_batch_job/__main__.py @@ -515,6 +515,12 @@ def run(args, build_function, blacklisted_package_names=None): # Install pip dependencies pip_packages = list(pip_dependencies) if sys.platform == 'win32': + # Install custom fork of python-humanfriendly + # TODO(jacobperron): Remove this once the issue is resolved upstream + # https://github.com/xolox/python-humanfriendly/pull/45 + pip_packages += [ + 'git+https://github.com/dirk-thomas/python-humanfriendly@dirk-thomas/skip-pyreadline-py39', + ] if args.cmake_build_type == 'Debug': if args.ros_distro in ['dashing', 'eloquent']: pip_packages += [ @@ -743,6 +749,12 @@ def run(args, build_function, blacklisted_package_names=None): pass print('# END SUBSECTION') + # Workaround for Python version <= 3.8 to avoid deprecation warnings + # pyreadline does not support Python 3.9 + # TODO(jacobperron): Remove when Windows switches to Python 3.9 + if sys.platform == 'win32': + job.run(['"%s"' % job.python, '-m', 'pip', 'uninstall', '-y', 'pyreadline'], shell=True) + rc = build_function(args, job) job.post()