summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexis Metaireau <ametaireau@gmail.com>2010-08-06 17:13:25 +0200
committerAlexis Metaireau <ametaireau@gmail.com>2010-08-06 17:13:25 +0200
commit18a96ac4ab3d9f25c14f5da30628e94daab66ee2 (patch)
tree4cf4f4f6f62dfc5bc3ce2a93498df6da9e02c995 /src
parentfc24fde3f93e5bbb8a02fc48889eac635184619a (diff)
downloaddisutils2-18a96ac4ab3d9f25c14f5da30628e94daab66ee2.tar.gz
Minor changes: rename predicate to requirements, add some documentation and
remove trailing whitespaces.
Diffstat (limited to 'src')
-rw-r--r--src/distutils2/index/dist.py3
-rw-r--r--src/distutils2/index/xmlrpc.py6
2 files changed, 5 insertions, 4 deletions
diff --git a/src/distutils2/index/dist.py b/src/distutils2/index/dist.py
index c42d4ae..f5d0fd9 100644
--- a/src/distutils2/index/dist.py
+++ b/src/distutils2/index/dist.py
@@ -39,6 +39,7 @@ DIST_TYPES = ['bdist', 'sdist']
class IndexReference(object):
+ """Mixin used to store the index reference"""
def set_index(self, index=None):
self._index = index
@@ -367,7 +368,7 @@ class ReleasesList(IndexReference):
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
index aef2662..b9d66e0 100644
--- a/src/distutils2/index/xmlrpc.py
+++ b/src/distutils2/index/xmlrpc.py
@@ -94,7 +94,7 @@ class Client(BaseClient):
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 @@ class Client(BaseClient):
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 @@ class Client(BaseClient):
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