From 902e2042ba5d9abe4d837281b631fff405c0888b Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sat, 27 Nov 2021 22:50:34 -0500 Subject: [PATCH] Move _prefix_addition inline, so it's only configurable through sysconfig. --- distutils/command/install.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/distutils/command/install.py b/distutils/command/install.py index d648dd18..c97e1eb3 100644 --- a/distutils/command/install.py +++ b/distutils/command/install.py @@ -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 @@ -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: