aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2005-07-17 04:42:42 +0000
committerPJ Eby <distutils-sig@python.org>2005-07-17 04:42:42 +0000
commit30f1c5ad93e21ec007d371313e2a27e4d0efb661 (patch)
treeb809540a247a26776845a6f9a96c91a20f983af1 /setuptools
parentc8ebbe361890f4c0a34d7c3c64aefb34c6fed3e6 (diff)
downloadexternal_python_setuptools-30f1c5ad93e21ec007d371313e2a27e4d0efb661.tar.gz
external_python_setuptools-30f1c5ad93e21ec007d371313e2a27e4d0efb661.tar.bz2
external_python_setuptools-30f1c5ad93e21ec007d371313e2a27e4d0efb661.zip
Renamings for consistent terminology; distributions and requirements now
both have 'project_name' attributes, instead of one having 'name' and the other 'distname'. Requirements no longer have 'options', they have 'extras'. This is the beginning of the terminology/architecture refactoring described at: http://mail.python.org/pipermail/distutils-sig/2005-June/004652.html --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041132
Diffstat (limited to 'setuptools')
-rwxr-xr-xsetuptools/command/develop.py2
-rwxr-xr-xsetuptools/command/easy_install.py12
-rwxr-xr-xsetuptools/package_index.py4
-rw-r--r--setuptools/tests/test_resources.py10
4 files changed, 14 insertions, 14 deletions
diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py
index a757b2e5..40d22b28 100755
--- a/setuptools/command/develop.py
+++ b/setuptools/command/develop.py
@@ -51,7 +51,7 @@ class develop(easy_install):
self.dist = Distribution(
self.egg_path,
PathMetadata(self.egg_path, os.path.abspath(ei.egg_info)),
- name = ei.egg_name
+ project_name = ei.egg_name
)
def install_for_development(self):
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
index 4451c586..6d61c951 100755
--- a/setuptools/command/easy_install.py
+++ b/setuptools/command/easy_install.py
@@ -350,7 +350,7 @@ class easy_install(Command):
self.install_egg_scripts(dist)
log.warn(self.installation_report(dist, *info))
if requirement is None:
- requirement = Requirement.parse('%s==%s'%(dist.name,dist.version))
+ requirement = Requirement.parse('%s==%s'%(dist.project_name,dist.version))
if dist in requirement:
log.info("Processing dependencies for %s", requirement)
try:
@@ -419,7 +419,7 @@ class easy_install(Command):
options = match.group(1) or ''
if options:
options = ' '+options
- spec = '%s==%s' % (dist.name,dist.version)
+ spec = '%s==%s' % (dist.project_name,dist.version)
executable = os.path.normpath(sys.executable)
if dev_path:
@@ -541,7 +541,7 @@ class easy_install(Command):
# Create a dummy distribution object until we build the real distro
dist = Distribution(None,
- name=cfg.get('metadata','name'),
+ project_name=cfg.get('metadata','name'),
version=cfg.get('metadata','version'),
platform="win32"
)
@@ -678,7 +678,7 @@ installing:
(Note: you can run EasyInstall on '%s' with the
--delete-conflicting option to attempt deletion of the above files
and/or directories.)
-""" % dist.name
+""" % dist.project_name
else:
msg += """\
Note: you can attempt this installation again with EasyInstall, and use
@@ -719,7 +719,7 @@ this to work. (e.g. by being the application's script directory, by being on
PYTHONPATH, or by being added to sys.path by your code.)
"""
eggloc = dist.path
- name = dist.name
+ name = dist.project_name
version = dist.version
return msg % locals()
@@ -802,7 +802,7 @@ PYTHONPATH, or by being added to sys.path by your code.)
self.pth_file.save()
- if dist.name=='setuptools':
+ if dist.project_name=='setuptools':
# Ensure that setuptools itself never becomes unavailable!
# XXX should this check for latest version?
f = open(os.path.join(self.install_dir,'setuptools.pth'), 'w')
diff --git a/setuptools/package_index.py b/setuptools/package_index.py
index 5412fd1f..f553c2da 100755
--- a/setuptools/package_index.py
+++ b/setuptools/package_index.py
@@ -245,12 +245,12 @@ class PackageIndex(AvailableDistributions):
def find_packages(self, requirement):
- self.scan_url(self.index_url + requirement.distname+'/')
+ self.scan_url(self.index_url + requirement.project_name+'/')
if not self.package_pages.get(requirement.key):
# We couldn't find the target package, so search the index page too
self.warn(
"Couldn't find index page for %r (maybe misspelled?)",
- requirement.distname
+ requirement.project_name
)
if self.index_url not in self.fetched_urls:
self.warn(
diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py
index 91199f47..10786144 100644
--- a/setuptools/tests/test_resources.py
+++ b/setuptools/tests/test_resources.py
@@ -73,7 +73,7 @@ class DistroTests(TestCase):
self.assertEqual(ad.best_match(req,path).version, '1.4')
def checkFooPkg(self,d):
- self.assertEqual(d.name, "FooPkg")
+ self.assertEqual(d.project_name, "FooPkg")
self.assertEqual(d.key, "foopkg")
self.assertEqual(d.version, "1.3-1")
self.assertEqual(d.py_version, "2.4")
@@ -83,7 +83,7 @@ class DistroTests(TestCase):
def testDistroBasics(self):
d = Distribution(
"/some/path",
- name="FooPkg",version="1.3-1",py_version="2.4",platform="win32"
+ project_name="FooPkg",version="1.3-1",py_version="2.4",platform="win32"
)
self.checkFooPkg(d)
self.failUnless(d.installed_on(["/some/path"]))
@@ -99,7 +99,7 @@ class DistroTests(TestCase):
def testDistroMetadata(self):
d = Distribution(
- "/some/path", name="FooPkg", py_version="2.4", platform="win32",
+ "/some/path", project_name="FooPkg", py_version="2.4", platform="win32",
metadata = Metadata(
('PKG-INFO',"Metadata-Version: 1.0\nVersion: 1.3-1\n")
)
@@ -250,8 +250,8 @@ class RequirementsTests(TestCase):
r3 = Requirement.parse("Twisted[BAR,FOO]>=1.2.0")
self.assertEqual(r1,r2)
self.assertEqual(r1,r3)
- self.assertEqual(r1.options, ("foo","bar"))
- self.assertEqual(r2.options, ("bar","FOO"))
+ self.assertEqual(r1.extras, ("foo","bar"))
+ self.assertEqual(r2.extras, ("bar","FOO"))
self.assertEqual(hash(r1), hash(r2))
self.assertEqual(
hash(r1), hash(("twisted", ((">=",parse_version("1.2")),),