[Python-checkins] distutils2: Minor changes: rename predicate to requirements, add some documentation and
tarek.ziade
python-checkins at python.org
Sun Aug 8 11:50:47 CEST 2010
tarek.ziade pushed 77de6a8b337a to distutils2:
http://hg.python.org/distutils2/rev/77de6a8b337a
changeset: 502:77de6a8b337a
user: Alexis Metaireau <ametaireau at gmail.com>
date: Fri Aug 06 17:13:25 2010 +0200
summary: Minor changes: rename predicate to requirements, add some documentation and
files: src/distutils2/index/dist.py, src/distutils2/index/xmlrpc.py
diff --git a/src/distutils2/index/dist.py b/src/distutils2/index/dist.py
--- a/src/distutils2/index/dist.py
+++ b/src/distutils2/index/dist.py
@@ -39,6 +39,7 @@
class IndexReference(object):
+ """Mixin used to store the index reference"""
def set_index(self, index=None):
self._index = index
@@ -367,7 +368,7 @@
if predicate.match(release.version)],
index=self._index)
- def get_last(self, predicate, prefer_final=None):
+ def get_last(self, requirements, prefer_final=None):
"""Return the "last" release, that satisfy the given predicates.
"last" is defined by the version number of the releases, you also could
diff --git a/src/distutils2/index/xmlrpc.py b/src/distutils2/index/xmlrpc.py
--- a/src/distutils2/index/xmlrpc.py
+++ b/src/distutils2/index/xmlrpc.py
@@ -94,7 +94,7 @@
if not versions:
raise ProjectNotFound(project_name)
project = self._get_project(project_name)
- project.add_releases([ReleaseInfo(project_name, version,
+ project.add_releases([ReleaseInfo(project_name, version,
index=self._index)
for version in versions])
project = project.filter(predicate)
@@ -102,7 +102,7 @@
raise ReleaseNotFound("%s" % predicate)
project.sort_releases(prefer_final)
return project
-
+
def get_distributions(self, project_name, version):
"""Grab informations about distributions from XML-RPC.
@@ -121,7 +121,7 @@
dist_infos = {'url': info['url'],
'hashval': info['md5_digest'],
'hashname': 'md5',
- 'is_external': False,
+ 'is_external': False,
'python_version': info['python_version']}
release.add_distribution(packagetype, **dist_infos)
return release
--
Repository URL: http://hg.python.org/distutils2
More information about the Python-checkins
mailing list