misc (install): fixed self.root access when it's not used
This commit is contained in:
parent
e6d9f7e73e
commit
1976b05d33
1 changed files with 6 additions and 3 deletions
9
setup.py
9
setup.py
|
|
@ -137,9 +137,12 @@ class CustomInstall(install):
|
|||
os.symlink(source, dest)
|
||||
|
||||
def run(self):
|
||||
ignore_idx = 0 if self.root is None else len(self.root)
|
||||
if self.root[-1] == '/':
|
||||
ignore_idx-=1 # we dont want to remove the first '/' in _final paths
|
||||
if not self.root:
|
||||
ignore_idx = 0
|
||||
else:
|
||||
ignore_idx = len(self.root)
|
||||
if self.root[-1] == '/':
|
||||
ignore_idx-=1 # we dont want to remove the first '/' in _final paths
|
||||
# _final suffixed attributes are the ones without the self.root prefix path
|
||||
# it's used at least on Arch linux installation as install is made on a local $pkgdir
|
||||
# which is later moved to user's FS root
|
||||
|
|
|
|||
Loading…
Reference in a new issue