[Distutils] setuptools 0.6c7 and zc.buildout: find-links egg fragment issue

Tarek Ziadé ziade.tarek at gmail.com
Thu Feb 7 21:42:03 CET 2008


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):


  find-links =

  egg =

  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:

  [Errno 21] Is a directory: '/Users/tziade/.buildout/downloads/trunk'

That's because the function should extract the egg name from the egg
If I add this code there:

  if '#egg=' in url:
     name = url.split('#=egg')[-1].strip()
     ... 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.


View this message in context: http://www.nabble.com/setuptools-0.6c7-and-zc.buildout%3A-find-links-egg-fragment-issue-tp15342830p15342830.html
Sent from the Python - distutils-sig mailing list archive at Nabble.com.

More information about the Distutils-SIG mailing list