[packaging] Egg are not valid cubicweb prefix. stable
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Fri, 15 Oct 2010 11:39:10 +0200
branchstable
changeset 6503 0fd079726606
parent 6502 1e1de0339a95
child 6504 88b3172eb7c7
[packaging] Egg are not valid cubicweb prefix.
cwconfig.py
--- a/cwconfig.py	Wed Oct 13 18:58:56 2010 +0200
+++ b/cwconfig.py	Fri Oct 15 11:39:10 2010 +0200
@@ -201,7 +201,8 @@
     old_prefix = None
     if not isdir(start_path):
         prefix = dirname(start_path)
-    while not isdir(join(prefix, 'share', 'cubicweb')) and prefix != old_prefix:
+    while (not isdir(join(prefix, 'share', 'cubicweb'))
+          or prefix.endswith('.egg')) and prefix != old_prefix:
         old_prefix = prefix
         prefix = dirname(prefix)
     if isdir(join(prefix, 'share', 'cubicweb')):