[Python-checkins] python/nondist/sandbox/setuptools/setuptools package_index.py, 1.12, 1.13

pje@users.sourceforge.net pje at users.sourceforge.net
Sun Jul 17 21:54:41 CEST 2005


Update of /cvsroot/python/python/nondist/sandbox/setuptools/setuptools
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8964/setuptools
Modified Files:
	package_index.py 
Log Message:
The ``path`` attribute of ``Distribution`` objects is now ``location``,
because it isn't necessarily a filesystem path (and hasn't been for some
time now). ``Distribution`` objects now have an ``as_requirement()`` 
method that returns a ``Requirement`` for the distribution's project name
and version.
Index: package_index.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/setuptools/package_index.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- package_index.py	17 Jul 2005 04:42:41 -0000	1.12
+++ package_index.py	17 Jul 2005 19:54:38 -0000	1.13
@@ -52,10 +52,8 @@
 if basename.endswith('.egg.zip'):
 basename = basename[:-4] # strip the .zip
 
- if basename.endswith('.egg'):
- dist = Distribution.from_filename(basename, metadata)
- dist.path = url_or_path
- return [dist] # only one, unambiguous interpretation
+ if basename.endswith('.egg'): # only one, unambiguous interpretation 
+ return [Distribution.from_location(url_or_path, basename, metadata)]
 
 if basename.endswith('.exe'):
 win_base, py_ver = parse_bdist_wininst(basename)
@@ -80,6 +78,8 @@
 
 
 
+
+
 def interpret_distro_name(url_or_path, basename, metadata,
 py_version=None, distro_type=SOURCE_DIST, platform=None
 ):


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /