[Zope3-checkins] SVN: Zope3/trunk/setup.py Insert new directories
to the start of sys.path
Dmitry Vasiliev
dima at hlabs.spb.ru
Fri Sep 2 07:05:20 EDT 2005
Log message for revision 38239:
Insert new directories to the start of sys.path
Changed:
U Zope3/trunk/setup.py
-=-
Modified: Zope3/trunk/setup.py
===================================================================
--- Zope3/trunk/setup.py 2005-09-02 10:01:57 UTC (rev 38238)
+++ Zope3/trunk/setup.py 2005-09-02 11:05:20 UTC (rev 38239)
@@ -19,9 +19,14 @@
here = os.path.dirname(os.path.abspath(__file__))
buildsupport = os.path.join(here, "buildsupport")
-sys.path.insert(0, buildsupport)
# Process *.pth files from buildsupport/:
+last = len(sys.path)
site.addsitedir(buildsupport)
+if len(sys.path) > last:
+ # Move all appended directories to the start
+ new = sys.path[last:]
+ del sys.path[last:]
+ sys.path[:0] = new
import zpkgsetup.package
import zpkgsetup.publication
More information about the Zope3-Checkins
mailing list