]> granicus.if.org Git - python/commitdiff
p.strip(os.sep) can't have possibly worked. It would have stripped both
authorSkip Montanaro <skip@pobox.com>
Tue, 6 May 2003 20:59:57 +0000 (20:59 +0000)
committerSkip Montanaro <skip@pobox.com>
Tue, 6 May 2003 20:59:57 +0000 (20:59 +0000)
leading and trailing '/' characters on Unix systems.

setup.py

index e540df5a86d6f21f11477be91914a5e27d6a35b1..3761af675e84a868f4fbcd72fa93a37e8c9d07a5 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -59,8 +59,7 @@ def find_library_file(compiler, libname, std_dirs, paths):
     dirname = os.path.dirname(result)
     for p in std_dirs:
         # Ensure path doesn't end with path separator
-        if p.endswith(os.sep):
-            p = p.strip(os.sep)
+        p = p.rstrip(os.sep)
         if p == dirname:
             return [ ]
 
@@ -68,8 +67,7 @@ def find_library_file(compiler, libname, std_dirs, paths):
     # so we have to figure out which one.
     for p in paths:
         # Ensure path doesn't end with path separator
-        if p.endswith(os.sep):
-            p = p.strip(os.sep)
+        p = p.rstrip(os.sep)
         if p == dirname:
             return [p]
     else: