[Checkins] SVN: zc.buildout/branches/use_distribute/ mroe changes to use distribute in favour of setuptools
Chris Withers
chris at simplistix.co.uk
Thu Aug 6 11:24:39 EDT 2009
Log message for revision 102547:
mroe changes to use distribute in favour of setuptools
Changed:
U zc.buildout/branches/use_distribute/src/zc/buildout/buildout.py
U zc.buildout/branches/use_distribute/src/zc/buildout/easy_install.py
U zc.buildout/branches/use_distribute/src/zc/buildout/testing.py
U zc.buildout/branches/use_distribute/zc.recipe.egg_/src/zc/recipe/egg/egg.py
-=-
Modified: zc.buildout/branches/use_distribute/src/zc/buildout/buildout.py
===================================================================
--- zc.buildout/branches/use_distribute/src/zc/buildout/buildout.py 2009-08-06 14:53:44 UTC (rev 102546)
+++ zc.buildout/branches/use_distribute/src/zc/buildout/buildout.py 2009-08-06 15:24:38 UTC (rev 102547)
@@ -47,7 +47,7 @@
realpath = zc.buildout.easy_install.realpath
pkg_resources_loc = pkg_resources.working_set.find(
- pkg_resources.Requirement.parse('setuptools')).location
+ pkg_resources.Requirement.parse('distribute')).location
_isurl = re.compile('([a-zA-Z0-9+.-]+)://').match
@@ -342,9 +342,9 @@
self._setup_directories()
- # Now copy buildout and setuptools eggs, amd record destination eggs:
+ # Now copy buildout and distribute eggs, amd record destination eggs:
entries = []
- for name in 'setuptools', 'zc.buildout':
+ for name in 'distribute', 'zc.buildout':
r = pkg_resources.Requirement.parse(name)
dist = pkg_resources.working_set.find(r)
if dist.precedence == pkg_resources.DEVELOP_DIST:
@@ -789,7 +789,7 @@
self._log_level = level
def _maybe_upgrade(self):
- # See if buildout or setuptools need to be upgraded.
+ # See if buildout or distribute need to be upgraded.
# If they do, do the upgrade and restart the buildout process.
__doing__ = 'Checking for upgrades.'
@@ -799,7 +799,7 @@
ws = zc.buildout.easy_install.install(
[
(spec + ' ' + self['buildout'].get(spec+'-version', '')).strip()
- for spec in ('zc.buildout', 'setuptools')
+ for spec in ('zc.buildout', 'distribute')
],
self['buildout']['eggs-directory'],
links = self['buildout'].get('find-links', '').split(),
@@ -809,7 +809,7 @@
)
upgraded = []
- for project in 'zc.buildout', 'setuptools':
+ for project in 'zc.buildout', 'distribute':
req = pkg_resources.Requirement.parse(project)
if ws.find(req) != pkg_resources.working_set.find(req):
upgraded.append(ws.find(req))
@@ -1485,7 +1485,7 @@
bootstrap
Create a new buildout in the current working directory, copying
- the buildout and setuptools eggs and, creating a basic directory
+ the buildout and distribute eggs and, creating a basic directory
structure and a buildout-local buildout script.
init
@@ -1496,10 +1496,10 @@
setup script [setup command and options]
- Run a given setup script arranging that setuptools is in the
+ Run a given setup script arranging that distribute is in the
script's path and and that it has been imported so that
- setuptools-provided commands (like bdist_egg) can be used even if
- the setup script doesn't import setuptools itself.
+ distribute-provided commands (like bdist_egg) can be used even if
+ the setup script doesn't import distribute itself.
The script can be given either as a script path or a path to a
directory containing a setup.py script.
Modified: zc.buildout/branches/use_distribute/src/zc/buildout/easy_install.py
===================================================================
--- zc.buildout/branches/use_distribute/src/zc/buildout/easy_install.py 2009-08-06 14:53:44 UTC (rev 102546)
+++ zc.buildout/branches/use_distribute/src/zc/buildout/easy_install.py 2009-08-06 15:24:38 UTC (rev 102547)
@@ -14,7 +14,7 @@
"""Python easy_install API
This module provides a high-level Python API for installing packages.
-It doesn't install scripts. It uses setuptools and requires it to be
+It doesn't install scripts. It uses distribute and requires it to be
installed.
$Id$
@@ -61,7 +61,7 @@
setuptools_loc = pkg_resources.working_set.find(
- pkg_resources.Requirement.parse('setuptools')
+ pkg_resources.Requirement.parse('distribute')
).location
# Include buildout and setuptools eggs in paths
@@ -301,7 +301,7 @@
tmp = tempfile.mkdtemp(dir=dest)
try:
path = self._get_dist(
- self._constrain(pkg_resources.Requirement.parse('setuptools')),
+ self._constrain(pkg_resources.Requirement.parse('distribute')),
ws, False,
)[0].location
@@ -594,7 +594,7 @@
def _maybe_add_setuptools(self, ws, dist):
if dist.has_metadata('namespace_packages.txt'):
for r in dist.requires():
- if r.project_name == 'setuptools':
+ if r.project_name == 'distribute':
break
else:
# We have a namespace package but no requirement for setuptools
@@ -602,10 +602,10 @@
logger.warn(
"Develop distribution: %s\n"
"uses namespace packages but the distribution "
- "does not require setuptools.",
+ "does not require distribute.",
dist)
requirement = self._constrain(
- pkg_resources.Requirement.parse('setuptools')
+ pkg_resources.Requirement.parse('distribute')
)
if ws.find(requirement) is None:
for dist in self._get_dist(requirement, ws, False):
@@ -1047,7 +1047,7 @@
if is_win32:
# generate exe file and give the script a magic name:
exe = script+'.exe'
- new_data = pkg_resources.resource_string('setuptools', 'cli.exe')
+ new_data = pkg_resources.resource_string('distirbute', 'cli.exe')
if not os.path.exists(exe) or (open(exe, 'rb').read() != new_data):
# Only write it if it's different.
open(exe, 'wb').write(new_data)
@@ -1103,7 +1103,7 @@
# generate exe file and give the script a magic name:
exe = script + '.exe'
open(exe, 'wb').write(
- pkg_resources.resource_string('setuptools', 'cli.exe')
+ pkg_resources.resource_string('distribute', 'cli.exe')
)
generated.append(exe)
Modified: zc.buildout/branches/use_distribute/src/zc/buildout/testing.py
===================================================================
--- zc.buildout/branches/use_distribute/src/zc/buildout/testing.py 2009-08-06 14:53:44 UTC (rev 102546)
+++ zc.buildout/branches/use_distribute/src/zc/buildout/testing.py 2009-08-06 15:24:38 UTC (rev 102547)
@@ -40,7 +40,7 @@
is_win32 = sys.platform == 'win32'
setuptools_location = pkg_resources.working_set.find(
- pkg_resources.Requirement.parse('setuptools')).location
+ pkg_resources.Requirement.parse('distribute')).location
def cat(dir, *names):
path = os.path.join(dir, *names)
Modified: zc.buildout/branches/use_distribute/zc.recipe.egg_/src/zc/recipe/egg/egg.py
===================================================================
--- zc.buildout/branches/use_distribute/zc.recipe.egg_/src/zc/recipe/egg/egg.py 2009-08-06 14:53:44 UTC (rev 102546)
+++ zc.buildout/branches/use_distribute/zc.recipe.egg_/src/zc/recipe/egg/egg.py 2009-08-06 15:24:38 UTC (rev 102547)
@@ -151,11 +151,11 @@
if get_bool(options, 'dependent-scripts'):
# generate scripts for all packages in the working set,
- # except setuptools.
+ # except distribute.
reqs = list(reqs)
for dist in ws:
name = dist.project_name
- if name != 'setuptools' and name not in reqs:
+ if name != 'distribute' and name not in reqs:
reqs.append(name)
return zc.buildout.easy_install.scripts(
More information about the Checkins
mailing list