[Distutils] setuptools 8 changes are great, but ...

Maurits van Rees m.van.rees at zestsoftware.nl
Tue Dec 16 00:46:07 CET 2014


Maurits van Rees schreef op 15-12-14 23:50:
> TMP2/setuptools-8.0.4-py2.7.egg/pkg_resources.py:2425: RuntimeWarning:
> 'zc.buildout-2.3.0 ()' is being parsed as a legacy, non PEP 440,
> version. You may find odd behavior and sort order. In particular it will
> be sorted as less than 0.0. It is recommend to migrate to PEP 440
> compatible versions.

Actually, I have configured zc.buildout to use a download-cache 
directory where it saves downloaded zips/tarballs/eggs from PyPI. 
Buildout then adds this directory as a find-link and setuptools calls 
package_index.scan_url on it.  This prints the warnings, because it sees 
for example a file
'/Users/mauritsvanrees/cached-downloads/dist/Acquisition-2.13.8.zip'
This gets parsed as a Distribution with project_name 
'Acquisition-2.13.8' and an empty version.

Ah, a demo with plain setuptools 0.8.4 is easy to setup:

$ mkdir bar
$ touch bar/project-1.0.zip
$ . bin/activate
(venv) $ python
Python 2.7.8 (default, Jul 28 2014, 10:41:45)
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
 >>> from setuptools import package_index
 >>> pi = package_index.PackageIndex()
 >>> pi.add_find_links(['bar'])
/Users/mauritsvanrees/tmp/venv/lib/python2.7/site-packages/pkg_resources.py:2425: 
RuntimeWarning: 'project-1.0 ()' is being parsed as a legacy, non PEP 
440, version. You may find odd behavior and sort order. In particular it 
will be sorted as less than 0.0. It is recommend to migrate to PEP 440 
compatible versions.
   RuntimeWarning,
 >>>



-- 
Maurits van Rees: http://maurits.vanrees.org/
Zest Software: http://zestsoftware.nl



More information about the Distutils-SIG mailing list