diff --git a/colcon_core/python_install_path.py b/colcon_core/python_install_path.py index d5f26d15..cb08789d 100644 --- a/colcon_core/python_install_path.py +++ b/colcon_core/python_install_path.py @@ -18,7 +18,9 @@ def get_python_install_path(name, vars_=()): """ kwargs = {} kwargs['vars'] = dict(vars_) + # Avoid deb_system because it means using --install-layout deb + # which ignores --prefix and hardcodes it to /usr if 'deb_system' in sysconfig.get_scheme_names(): - kwargs['scheme'] = 'deb_system' + kwargs['scheme'] = 'posix_prefix' return Path(sysconfig.get_path(name, **kwargs)) diff --git a/colcon_core/task/python/build.py b/colcon_core/task/python/build.py index bc5d73de..54868764 100644 --- a/colcon_core/task/python/build.py +++ b/colcon_core/task/python/build.py @@ -110,7 +110,6 @@ async def build(self, *, additional_hooks=None): # noqa: D102 ] if setup_py_data.get('data_files'): cmd += ['install_data', '--install-dir', args.install_base] - self._append_install_layout(args, cmd) completed = await run( self.context, cmd, cwd=args.build_base, env=env) finally: @@ -300,5 +299,9 @@ def _get_python_lib(self, args): return os.path.relpath(path, start=args.install_base) def _append_install_layout(self, args, cmd): + # Debian patches sysconfig to return a path containing dist-packages + # instead of site-packages when using the default install scheme. + # TODO(sloretz) this is potentially unused now that + # get_python_install_path avoids the deb_system scheme. if 'dist-packages' in self._get_python_lib(args): cmd += ['--install-layout', 'deb'] diff --git a/test/spell_check.words b/test/spell_check.words index 8ee496aa..52eb1ced 100644 --- a/test/spell_check.words +++ b/test/spell_check.words @@ -41,6 +41,7 @@ getcategory getpid getpreferredencoding github +hardcodes hookimpl hookwrapper https @@ -100,6 +101,7 @@ setupscript setuptools shlex sigint +sloretz stacklevel staticmethod stdeb