Skip to content

Commit e97d941

Browse files
committed
fix: issue2551290? windows install works
It looks like windows installs have been broken since at least 2.1.0. Installing on windows triggered an infinite loop. Fix that in two different ways: 1 linux uses lib, windows uses Lib. Use case insenstive match. 2 linux uses / as the root windows uses C:\ (or other drive letter). keep running the loop until the root/head path doesn't change.
1 parent f349738 commit e97d941

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ Fixed:
4242
look like it did previously to 2.3.0 if the new features aren't
4343
used. Roundup-admin output was never meant to be machine parsed, but
4444
don't break it unless required. (John Rouillard)
45+
- issue2551290 - pip install roundup Hangs on Windows 10
46+
The install under windows goes into an infinite loop using pip or
47+
source install. (John Rouillard)
4548

4649
Features:
4750

setup.py

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

0 commit comments

Comments
 (0)