[pkg] fix small bug appearing on Windows stable
authorAlain Leufroy <alain.leufroy@logilab.fr>
Mon, 17 Jan 2011 13:36:18 +0100
branchstable
changeset 6836 fb3633142d8f
parent 6835 87e2641d75f7
child 6837 7562418985ef
[pkg] fix small bug appearing on Windows
setup.py
--- a/setup.py	Mon Jan 17 12:43:07 2011 +0100
+++ b/setup.py	Mon Jan 17 13:36:18 2011 +0100
@@ -194,9 +194,10 @@
         old_ok = DS._ok
         def _ok(self, path):
             """Return True if ``path`` can be written during installation."""
-            out = old_ok(self, path)
+            out = old_ok(self, path) # here for side effect from setuptools
             realpath = os.path.normcase(os.path.realpath(path))
-            if realpath.startswith(sys.prefix):
+            allowed_path = os.path.normcase(sys.prefix)
+            if realpath.startswith(allowed_path):
                 out = True
             return out
         DS._ok = _ok