Skip to content

Conversation

@cielavenir
Copy link

@cielavenir cielavenir commented Oct 26, 2025

            if self.prefix is None:
                if self.exec_prefix is not None:
                    raise DistutilsOptionError(
                        "must not supply exec-prefix without prefix"
                    )

                # Allow Fedora to add components to the prefix
                _prefix_addition = getattr(sysconfig, '_prefix_addition', "")

                self.prefix = os.path.normpath(sys.prefix) + _prefix_addition
                self.exec_prefix = os.path.normpath(sys.exec_prefix) + _prefix_addition

            else:
                if self.exec_prefix is None:
                    self.exec_prefix = self.prefix

            self.install_base = self.prefix
            self.install_platbase = self.exec_prefix
            self.select_scheme("posix_prefix")

Here _prefix_addition is considered only when self.prefix is only None.

Meanwhile, select_scheme("posix_prefix") becomes select_scheme("posix_local") on Debian 12+ unconditionally.

self.prefix should be considered.


This is basically for setup.py install --prefix=. For pip install --prefix=, see pypa/pip#13634 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant