changeset 7607:bb443db61d1c

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.
author John Rouillard <rouilj@ieee.org>
date Thu, 17 Aug 2023 12:58:37 -0400
parents 7301b776a94a
children cdc7490f510e
files CHANGES.txt setup.py
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES.txt	Thu Aug 17 11:03:45 2023 -0400
+++ b/CHANGES.txt	Thu Aug 17 12:58:37 2023 -0400
@@ -42,6 +42,9 @@
   look like it did previously to 2.3.0 if the new features aren't
   used.  Roundup-admin output was never meant to be machine parsed, but
   don't break it unless required. (John Rouillard)
+- issue2551290 - pip install roundup Hangs on Windows 10
+  The install under windows goes into an infinite loop using pip or
+  source install. (John Rouillard)
 
 Features:
 
--- a/setup.py	Thu Aug 17 11:03:45 2023 -0400
+++ b/setup.py	Thu Aug 17 12:58:37 2023 -0400
@@ -87,13 +87,15 @@
     if prefix:
         return prefix
     else:
-        # get the platform lib path. Must start with / else infinite loop.
+        # start with the platform library
         plp = get_path('platlib')
         # nuke suffix that matches lib/* and return prefix
         head, tail = os.path.split(plp)
-        while tail not in ['lib', 'lib64' ] and head != '/':
+        old_head = None
+        while tail.lower() not in ['lib', 'lib64' ] and head != old_head:
+            old_head = head
             head, tail = os.path.split(head)
-        if head == '/':
+        if head == old_head:
             head = sys.prefix
         return head
 

Roundup Issue Tracker: http://roundup-tracker.org/