[setuptools] setup.py develop inaccurate error message?

I got an error message while running setup.py develop that I don't understand: seems the error message claims an automatic install of a dependency failed, even though the dependency's egg actually did get installed and appears correct. (A bit tangential, but explanatory) background: Noting PJE's doc update repeating your recomendation to run setup.py develop. I wondered how setuptools would handle fetching a newer SVN revision of a dependency D installed with setup.py develop from an SVN checkout when running setup.py develop on a project P that depends on D. Would it use the .egg-link file to find and update the original working copy from which D was installed, or instead create a fresh SVN checkout? D == ClientForm P == mechanize So, I tried the following: 1. Installed ClientForm in site-packages from an SVN checkout using setup.py develop 2. Installed mechanize, which depends on Clientform, from an SVN checkout using setup.py develop 3. Modified my local copy of mechanize's setup.py to require a newer revision of ClientForm than I had installed in step 1. The modified dependency reads "ClientForm>=0.2.2-r21160, ==dev" 4. Ran python setup.py develop again for mechanize. That last step installed an egg with the right name (using a fresh checkout, which I guess answers the question above that motivated me), but also ended with this error message: error: Could not find required distribution ClientForm==dev,>=0.2.2-r21160 However, the ClientForm egg did in fact get installed and does indeed contain revision 21160. So, why the error message? Full output of step 4: mechanize[0]# python setup.py develop running develop running egg_info writing requirements to ./mechanize.egg-info/requires.txt writing ./mechanize.egg-info/PKG-INFO writing top-level names to ./mechanize.egg-info/top_level.txt running build_ext Creating /usr/lib/python2.3/site-packages/mechanize.egg-link (link to .) mechanize 0.0.12a.dev-r20866 is already the active version in easy-install.pth Installed /hda/usr/local/buf/comp/dev/wwwsearch/wwwsearch/mechanize Processing dependencies for mechanize==0.0.12a.dev-r20866 Searching for ClientForm==dev,>=0.2.2-r21160 Reading http://www.python.org/pypi/ClientForm/ Reading http://wwwsearch.sourceforge.net/ClientForm/ Best match: ClientForm dev Downloading http://codespeak.net/svn/wwwsearch/ClientForm/trunk#egg=ClientForm-dev Doing subversion checkout from http://codespeak.net/svn/wwwsearch/ClientForm/trunk to /tmp/easy_install-31mf3S/trunk Processing trunk Running setup.py -q bdist_egg --dist-dir /tmp/easy_install-31mf3S/trunk/egg-dist-tmp-qFDl23 Removing ClientForm 0.2.2.dev-r20620 from easy-install.pth file Adding ClientForm 0.2.2.dev-r21160 to easy-install.pth file Installed /usr/lib/python2.3/site-packages/ClientForm-0.2.2.dev_r21160-py2.3.egg error: Could not find required distribution ClientForm==dev,>=0.2.2-r21160 mechanize[0]# mechanize[0]# cd ../ClientForm ClientForm[0]# svn st -u ? README.html * 20620 README.html.in * 20620 test.py * 20620 setup.py M * 20620 ClientForm.py ? ClientForm.egg-info ? ClientForm.pyc X ez_setup Status against revision: 21261 Performing status on external item at 'ez_setup' ? ez_setup/__init__.pyc Status against revision: 2110 ClientForm[0]# cat /usr/lib/python2.3/site-packages/mechanize.egg-link /hda/usr/local/buf/comp/dev/wwwsearch/wwwsearch/mechanizeClientForm[0]# pwd /home/john/comp/dev/wwwsearch/wwwsearch/ClientForm ClientForm[0]# John

At 01:03 AM 12/18/2005 +0000, John J Lee wrote:
... However, the ClientForm egg did in fact get installed and does indeed contain revision 21160. So, why the error message? ... Adding ClientForm 0.2.2.dev-r21160 to easy-install.pth file ... error: Could not find required distribution ClientForm==dev,>=0.2.2-r21160
0.2.2.dev-r21160 was installed, but your requirement was for 0.2.2-r21160. The installed version is r21160 of an in-development pre-release of 0.2.2, while your requirement is for an r21160 *post*-release patch of 0.2.2. In other words, the error is due to a typo in your requirement. With respect to the idea of doing SVN updates of dependencies (as opposed to doing fresh checkouts and egg builds), it's an interesting idea but it seems like the implementation would be complex, to say the least. A key issue is that .egg-link files don't have any way to point to their project's setup script. But I'll give it some thought for when I start work on 0.7, which will be refactoring some internals of the requirement/resolution system anyway. Maybe there will be a way to work something in then.

On Sat, 17 Dec 2005, Phillip J. Eby wrote: [...]
0.2.2.dev-r21160 was installed, but your requirement was for 0.2.2-r21160.
The installed version is r21160 of an in-development pre-release of 0.2.2, while your requirement is for an r21160 *post*-release patch of 0.2.2.
In other words, the error is due to a typo in your requirement.
Think-o, in fact. Sorry, I posted too quickly.
With respect to the idea of doing SVN updates of dependencies (as opposed to doing fresh checkouts and egg builds), it's an interesting idea but it seems like the implementation would be complex, to say the least. A key [...]
I wasn't surprised to find it works the way it does, but mildly disappointed. Do other people work with multi-egg projects (that don't necessarily share a single version control root), and want to make it possible for people to keep up with version control without updating multiple SVN checkouts by hand (and without doing multiple checkouts)? SVN in particular. I know one can always just write a simple script to do this kind of thing, but multiple platforms, changing dependencies, mucking around with PYTHONPATH or .pth files etc. make it less simple, which makes setuptools attractive. Probably I should instead work to get rid of my scrappy little release scripts, use branches a bit more, and just release much more often... John

At 02:52 PM 12/18/2005 +0000, John J Lee wrote:
Do other people work with multi-egg projects (that don't necessarily share a single version control root), and want to make it possible for people to keep up with version control without updating multiple SVN checkouts by hand (and without doing multiple checkouts)? SVN in particular. I know one can always just write a simple script to do this kind of thing, but multiple platforms, changing dependencies, mucking around with PYTHONPATH or .pth files etc. make it less simple, which makes setuptools attractive.
After giving it some more thought, I think having a 'nest update --develop' command might be the way to do this, assuming that 'nest update' ends up being a tool to check whether there are any updated versions of stuff you have installed. The --develop would tell it to only update all the SVN or CVS checkouts referenced by egg-links, and rerun "develop" on all of them afterwards. (As opposed to doing that and then updating any eggs too.) Anyway, "nest" won't appear until the 0.7 series starts, but this would probably be a cleaner way to implement the feature than hacking the normal easy_install process to incorporate it.
participants (2)
-
John J Lee
-
Phillip J. Eby