[Zope-CVS] CVS: Packages/zpkgtools/bin - zpkg:1.19
Fred L. Drake, Jr.
fred at zope.com
Wed Mar 31 11:10:48 EST 2004
Update of /cvs-repository/Packages/zpkgtools/bin
In directory cvs.zope.org:/tmp/cvs-serv11489/bin
Modified Files:
zpkg
Log Message:
when locating setuptools, prefer configuration information over import,
and import over the fallback CVS location (which requires network access)
=== Packages/zpkgtools/bin/zpkg 1.18 => 1.19 ===
--- Packages/zpkgtools/bin/zpkg:1.18 Tue Mar 30 22:44:27 2004
+++ Packages/zpkgtools/bin/zpkg Wed Mar 31 11:10:46 2004
@@ -169,20 +169,23 @@
if os.path.exists(setuptools_dest):
# already have it
return
- try:
- import setuptools
- except ImportError:
- if "setuptools" in self.locations:
- url = self.locations["setuptools"]
- else:
+ source = None
+ if "setuptools" in self.locations:
+ url = self.locations["setuptools"]
+ else:
+ try:
+ import setuptools
+ except ImportError:
# last resort
url = ("cvs://cvs.python.sourceforge.net/cvsroot/python"
":python/nondist/sandbox/setuptools/setuptools")
self.logger.info("resource package:setuptools not configured;"
" using bootstrap URL")
+ else:
+ source = os.path.abspath(setuptools.__path__[0])
+ if source is None:
source = self.loader.load(url)
- else:
- source = os.path.abspath(setuptools.__path__[0])
+
self.ip.copyTree(source, setuptools_dest)
tests_dir = os.path.join(setuptools_dest, "tests")
# XXX We could toss the tests, but that would screw up the
More information about the Zope-CVS
mailing list