FWIW, I find this feature to be baroque. I have very little interest in supporting it in buildout. (I wouldn't go out of my way to break it either.) I'd prefer to explore other ways to deal with the underlying use case in the context of buildout. I've tried to ignore this issue broadly, but I'm willing to work on an alternate solution because just seeing the discussion go by is too painful to keep ignoring. Jim On Feb 7, 2008, at 3:42 PM, Tarek Ziadé wrote:
Hello,
If I create a buildout that uses subversion links to get some eggs, with a download cache, like this (I can provide a test case):
[buildout]
find-links = http://svn.example.com/my.package/trunk#egg=my.package http://svn.example.com/my.package2/trunk#egg=my.package2
egg = my.package my.package2
download-cache = /Users/tziade/.buildout/downloads/
It will fail because setuptools will try to extract the egg name from the url, using this code in package_index._download_url:
name = filter(None,urlparse.urlparse(url)[2].split('/'))
The name will then be "trunk" and the method will fail to work properly on the next download (my.package2) because the "trunk" folder will already be there:
IOError: [Errno 21] Is a directory: '/Users/tziade/.buildout/downloads/trunk'
That's because the function should extract the egg name from the egg fragment. If I add this code there:
if '#egg=' in url: name = url.split('#=egg')[-1].strip() else: ... existing code to get the name..
It will work fine, because it will use unique egg names for folders. I would like to suggest changing the code this way.
++ Tarek
-- View this message in context: http://www.nabble.com/setuptools-0.6c7-and-zc.buildout%3A-find-links-egg-fra... Sent from the Python - distutils-sig mailing list archive at Nabble.com.
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
-- Jim Fulton Zope Corporation