Ticket #28 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

add link for egg-making purposes (setuptools)

Reported by: warner Owned by: warner
Priority: minor Milestone: 0.7.6
Version: Keywords:
Cc:

Description

whilst as pycon, the setuptools folks told me that the only thing keeping people from being able to type 'easy_install buildbot' was the lack of a link from the buildbot page to the source .tar.gz file. Or maybe it wants a URL in the cheeseshop entry, I'm not sure.

Fix this.

Change History

Changed 3 years ago by warner

  • status changed from new to assigned

The commands I'm using to test this are:

mkdir -p /tmp/f/lib/python2.4/site-packages
PYTHONPATH=/tmp/f/lib/python2.4/site-packages easy_install -n --prefix /tmp/f buildbot

I first tried just easy_install -n buildbot, but despite the --dry-run, setuptools tries to do a test write to the target directory. easy_install --prefix /tmp/f buildbot fails the test write as well, because setuptools is unwilling to create the intermediate directories (in this case /tmp/f/lib/python2.4/site-packages). Creating those directories by hand and then doing easy_install --prefix /tmp/f buildbot fails because setuptools helpfully notices that the target install directory is not on your PYTHONPATH and refuses to continue.

When installing setuptools-based packages from source, I just add --single-version-externally-managed and it usually stops complaining. It would appear that easy_install does not have such an option.

Changed 3 years ago by warner

Another interesting tool: do 'easy_install cheesecake', then cheesecake_index -n buildbot. That attempts to download your package and then measure a bunch of random quality-related things (pylint scores, setuptools usability, etc).

To use cheesecake without root, I did:

mkdir -p /tmp/f/lib/python2.4/site-packages
PYTHONPATH=/tmp/f/lib/python2.4/site-packages easy_install --prefix /tmp/f cheesecake
PYTHONPATH=/tmp/f/lib/python2.4/site-packages /tmp/f/bin/cheesecake_index -n buildbot

Changed 3 years ago by warner

I'm trying to find docs on what sort of links setuptools is willing to follow, and I'm not finding them.

Experimentation shows that a test page with an href pointing to a file named buildbot-0.7.5.tar.gz is enough to allow easy_install -f http://testpage buildbot locate the tarball, then download and install it.

If it sees a link named buildbot-0.7.5-py2.4.egg, it will use that in preference to the .tar.gz .

It will follow these hrefs even if the <a> that contains it uses a completely unrelated name. It will follow these hrefs even if they are inside HTML comments. It looks like it's doing a fairly simple regexp search.

So I think it would be sufficient to put links of any sort to the .tar.gz and .zip files on the front page. Hmm, although I need if it follows redirects, since the PyPI-registered home for buildbot is http://buildbot.net/ , which bounces you to http://buildbot.net/trac .

Changed 3 years ago by warner

Whoa, easy_install is pretty heroic in following links: pointing at  http://downloads.sourceforge.net/buildbot/buildbot-0.7.5.tar.gz was enough, as it managed to pick a mirror and wander through all the weird popups that sf.net throws in the way of a fairly simple download link.

I'm still not comfortable using this sort of where-the-heck-is-my-source-code-coming-from approach for my own systems, but I can appreciate how others would like the easy and convenience that this provides.

Changed 3 years ago by warner

  • status changed from assigned to closed
  • resolution set to fixed

done, it seems to work for me.

Note: See TracTickets for help on using tickets.