diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2020-07-26 10:38:13 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-07-26 10:38:13 -0400 |
commit | 384a51657c94271d29c437415080f25f7df4103b (patch) | |
tree | 585bbad51bb592ce5e3460edb4ac7dcb39192569 /setup.py | |
parent | dcc71f773576c19a3658735879893515b056ece5 (diff) | |
download | external_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-x | setup.py | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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 |