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 902e204
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions distutils/command/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +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."""
# High-level options: these select both an installation base
Expand Down Expand Up @@ -473,10 +470,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 902e204

Please sign in to comment.