Skip to content

Commit

Permalink
Move _prefix_addition inline, so it's only configurable through sysco…
Browse files Browse the repository at this point in the history
…nfig.
  • Loading branch information
jaraco committed Nov 28, 2021
1 parent f769018 commit 58ccfa5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions distutils/command/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,6 @@ class install(Command):

negative_opt = {'no-compile' : 'compile'}

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

def initialize_options(self):
"""Initializes options."""
Expand Down Expand Up @@ -473,10 +471,13 @@ def finalize_unix(self):
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) + self._prefix_addition)
os.path.normpath(sys.prefix) + _prefix_addition)
self.exec_prefix = (
os.path.normpath(sys.exec_prefix) + self._prefix_addition)
os.path.normpath(sys.exec_prefix) + _prefix_addition)

else:
if self.exec_prefix is None:
Expand Down

0 comments on commit 58ccfa5

Please sign in to comment.