Puzzling easy_install behavior
I'd like to share an experiment that I find puzzling and see if anyone could share some insight. Perhaps I'm doing something incorrectly. So, I have an links directory: [jim@ds9 tmp]$ ls links demo-1.0-py2.4.egg demoneeded-1.0-py2.4.egg index.html [jim@ds9 tmp]$ cat links/index.html <html><body> <a href="demo-1.0-py2.4.egg">demoneeded-1.0-py2.4.egg</a> <a href="demoneeded-1.0-py2.4.egg">demoneeded-1.0-py2.4.egg</a> </body></html> and an empty eggs directory: [jim@ds9 tmp]$ ls eggs Note that demo depends on demoneeded, without any qualifiers. I run easy_setup (0.6b3): [jim@ds9 tmp]$ /usr/local/python/2.4/bin/easy_install -q \ -f file:///home/jim/tmp/links/index.html -m -deggs demo and get the eggs I expect. [jim@ds9 tmp]$ ls eggs demo-1.0-py2.4.egg demoneeded-1.0-py2.4.egg I update the links with new versions of demo and demoneeded: [jim@ds9 tmp]$ ls links demo-1.0-py2.4.egg demoneeded-1.0-py2.4.egg index.html demo-1.1-py2.4.egg demoneeded-1.1-py2.4.egg [jim@ds9 tmp]$ cat links/index.html <html><body> <a href="demo-1.0-py2.4.egg">demoneeded-1.0-py2.4.egg</a> <a href="demoneeded-1.0-py2.4.egg">demoneeded-1.0-py2.4.egg</a> <a href="demo-1.1-py2.4.egg">demoneeded-1.1-py2.4.egg</a> <a href="demoneeded-1.1-py2.4.egg">demoneeded-1.1-py2.4.egg</a> </body></html> I haven't changed the unqualified dependence on demoneeded. Now I rerun easy_install: [jim@ds9 tmp]$ /usr/local/python/2.4/bin/easy_install -q \ -f file:///home/jim/tmp/links/index.html -m -deggs demo and I get a new demo egg even though I didn't elect to upgrade: [jim@ds9 tmp]$ ls eggs demo-1.0-py2.4.egg demo-1.1-py2.4.egg demoneeded-1.0-py2.4.egg I find this a bit mysterious. I thought easy_install wouldn't search the find links and index if existing distributions meet a requirement unless --upgrade was used. Is special consideration given to file URLs? (If so, this makes test writing a bit more challenging.) If I supply the upgrade option, I get: [jim@ds9 tmp]$ /usr/local/python/2.4/bin/easy_install -q \ -f file:///home/jim/tmp/links/index.html -m -U - deggs demo Couldn't find index page for 'demo' (maybe misspelled?) Scanning index of all packages (this may take a while) [jim@ds9 tmp]$ ls eggs demo-1.0-py2.4.egg demo-1.1-py2.4.egg demoneeded-1.0-py2.4.egg So when I said upgrade, the index was checked, but when I installed the distributions initially, it wasn't. Why? Why is upgrade handled differently from an initial install. Also, it's a bit surprising that I didn't get the available upgrade for demoneeded. Is that intended? Are there plans for a recursive upgrade option? Jim -- Jim Fulton mailto:jim@zope.com Python Powered! CTO (540) 361-1714 http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org
At 11:15 AM 6/22/2006 -0400, Jim Fulton wrote:
I find this a bit mysterious. I thought easy_install wouldn't search the find links and index if existing distributions meet a requirement unless --upgrade was used.
--upgrade means "look for things remotely, even if you can satisfy the requirements locally"
Is special consideration given to file URLs?
Yes, in that they are considered "local".
If I supply the upgrade option, I get:
[jim@ds9 tmp]$ /usr/local/python/2.4/bin/easy_install -q \ -f file:///home/jim/tmp/links/index.html -m -U - deggs demo Couldn't find index page for 'demo' (maybe misspelled?) Scanning index of all packages (this may take a while)
[jim@ds9 tmp]$ ls eggs demo-1.0-py2.4.egg demo-1.1-py2.4.egg demoneeded-1.0-py2.4.egg
So when I said upgrade, the index was checked, but when I installed the distributions initially, it wasn't. Why? Why is upgrade handled differently from an initial install.
Because upgrade really just overrides easy_install's preference to only look at the local machine to resolve dependencies.
Also, it's a bit surprising that I didn't get the available upgrade for demoneeded. Is that intended? Are there plans for a recursive upgrade option?
The answer to both questions is "more or less." :) It's intended only in the sense that that's just what it does, and I don't plan to change it. There are plans for recursive upgrade of some kind, but not to be added to easy_install. Instead, that would be part of "nest", whenever I actually get some work done on it. "nest" is supposed to be part of setuptools 0.7, but 0.6 final isn't out yet.
On Jun 22, 2006, at 11:38 AM, Phillip J. Eby wrote:
"nest" is supposed to be part of setuptools 0.7, but 0.6 final isn't out yet.
I don't know what "nest" is. Is it described anywhere? Jim -- Jim Fulton mailto:jim@zope.com Python Powered! CTO (540) 361-1714 http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org
At 11:41 AM 6/22/2006 -0400, Jim Fulton wrote:
On Jun 22, 2006, at 11:38 AM, Phillip J. Eby wrote:
"nest" is supposed to be part of setuptools 0.7, but 0.6 final isn't out yet.
I don't know what "nest" is. Is it described anywhere?
Yes. For example, in some of our previous IRC chats regarding setuptools. :) You can also google for distutils nest or setuptools nest and find quite a lot of previous discussion. The design (such as it is) is only found in outline form in my PIM.
participants (2)
-
Jim Fulton
-
Phillip J. Eby