summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-07-26 10:44:51 -0400
committerJason R. Coombs <jaraco@jaraco.com>2020-07-26 10:44:51 -0400
commit5642e413fb6c75434f109be943bdb09ea9e7ade2 (patch)
tree5c01f88716d3fd2a68a4ed557f3ebda09e31f505 /setup.py
parent268ef5f553f29977f708c256ee398c9e29cb4da7 (diff)
downloadpython-setuptools-git-5642e413fb6c75434f109be943bdb09ea9e7ade2.tar.gz
Extract function for restoring install lib to encapsulate behavior.
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/setup.py b/setup.py
index 6290a746..6f6601fe 100755
--- a/setup.py
+++ b/setup.py
@@ -104,14 +104,15 @@ class install_with_pth(install):
def finalize_options(self):
install.finalize_options(self)
+ self._restore_install_lib()
- # undo secondary effect of `extra_path` adding to `install_lib`
- install_suffix = os.path.relpath(
- self.install_lib,
- self.install_libbase,
- )
+ def _restore_install_lib(self):
+ """
+ Undo secondary effect of `extra_path` adding to `install_lib`
+ """
+ suffix = os.path.relpath(self.install_lib, self.install_libbase)
- if install_suffix == self._pth_contents:
+ if suffix == self._pth_contents:
self.install_lib = self.install_libbase