Skip to content

Commit 904a6a7

Browse files
committed
issue2551169 - setup.py enters endless loop on gentoo linux python2 installation.
Recognized lib64 as a possible valid path. Also exit when / is found.
1 parent 17f7288 commit 904a6a7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ Fixed:
6363
seconds. This seems to help reduce stalled connections when a
6464
number of connections are made at the same time. Log remaining
6565
retries once 5 of them have been used. (John Rouillard)
66+
- issue2551169 - setup.py enters endless loop on gentoo linux python2
67+
installation. Fixed.
6668

6769
Features:
6870

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ def get_prefix():
8787
if prefix:
8888
return prefix
8989
else:
90-
# get the platform lib path.
90+
# get the platform lib path. Must start with / else infinite loop.
9191
plp = get_path('platlib')
9292
# nuke suffix that matches lib/* and return prefix
9393
head, tail = os.path.split(plp)
94-
while tail != 'lib' and head != '':
94+
while tail not in ['lib', 'lib64' ] and head != '/':
9595
head, tail = os.path.split(head)
96-
if not head:
96+
if head == '/':
9797
head = sys.prefix
9898
return head
9999

0 commit comments

Comments
 (0)