diff --git a/colcon_core/python_install_path.py b/colcon_core/python_install_path.py index 09a2710e..122615d8 100644 --- a/colcon_core/python_install_path.py +++ b/colcon_core/python_install_path.py @@ -23,5 +23,11 @@ def get_python_install_path(name, vars_=()): if 'deb_system' in sysconfig.get_scheme_names() or \ 'osx_framework_library' in sysconfig.get_scheme_names(): kwargs['scheme'] = 'posix_prefix' + # The presence of the rpm_prefix scheme indicates that posix_prefix + # has been patched to inject `local` into the installation locations. + # The rpm_prefix scheme is a backup of what posix_prefix was before it was + # patched. + elif 'rpm_prefix' in sysconfig.get_scheme_names(): + kwargs['scheme'] = 'rpm_prefix' return Path(sysconfig.get_path(name, **kwargs))