diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2020-07-26 10:44:51 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-07-26 10:44:51 -0400 |
commit | 5642e413fb6c75434f109be943bdb09ea9e7ade2 (patch) | |
tree | 5c01f88716d3fd2a68a4ed557f3ebda09e31f505 /setup.py | |
parent | 268ef5f553f29977f708c256ee398c9e29cb4da7 (diff) | |
download | python-setuptools-git-5642e413fb6c75434f109be943bdb09ea9e7ade2.tar.gz |
Extract function for restoring install lib to encapsulate behavior.
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -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 |