aboutsummaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-07-26 10:38:13 -0400
committerJason R. Coombs <jaraco@jaraco.com>2020-07-26 10:38:13 -0400
commit384a51657c94271d29c437415080f25f7df4103b (patch)
tree585bbad51bb592ce5e3460edb4ac7dcb39192569 /setup.py
parentdcc71f773576c19a3658735879893515b056ece5 (diff)
downloadexternal_python_setuptools-384a51657c94271d29c437415080f25f7df4103b.tar.gz
external_python_setuptools-384a51657c94271d29c437415080f25f7df4103b.tar.bz2
external_python_setuptools-384a51657c94271d29c437415080f25f7df4103b.zip
Extract pth name and contents into class variables.
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 2d8bdf85..edb2bbcf 100755
--- a/setup.py
+++ b/setup.py
@@ -92,18 +92,21 @@ class install_with_pth(install):
`distutils` than the standard library.
"""
+ _pth_name = 'distutils-precedence'
+ _pth_contents = 'import _distutils_hack.install'
+
def initialize_options(self):
install.initialize_options(self)
- self.extra_path = (
- 'distutils-precedence', 'import _distutils_hack.install')
+ self.extra_path = self._pth_name, self._pth_contents
def finalize_options(self):
install.finalize_options(self)
+ # undo secondary effect of `extra_path` adding to `install_lib`
install_suffix = os.path.relpath(self.install_lib,
self.install_libbase)
- if install_suffix == self.extra_path[1]:
+ if install_suffix == self._pth_contents:
self.install_lib = self.install_libbase