Finding eggs when dependency_links and user specified URLs both given to easy_install?
What happens if a user specifies a URL via a '-f' option on the easy_install command line but our published eggs specify dependency_links in the setup.py? Will easy_install search the user's specified location first, last, or will it not search them at all? (I'm hoping for the first!) I'm asking because we want to provide binaries (eggs) of our projects for various platforms (RHEL3, RHEL4, RHEL5, Ubuntu 7.04, etc.) all of which generate the same egg name, but our projects include C /C++ extensions that require compilation for the specific platform, so we've structured an egg repository that allows us to separate these equivalently named eggs by the actual target platform. We also want users to be able to install from source tar/zip balls for platforms we haven't built binaries for yet, so our eggs all include dependency_links to point at our egg repo. Due to issues with build management, we aren't currently listing the target platform URLs in each egg's setup.py's dependency_links when it gets built on that target platform. It just has the source tar/zip ball repository's URL. But early indications are that when a user installs by doing something like: easy_install -f <enthought platform specific repo url> ets==2.5b2 then the first egg gets found properly in the platform specific repo, but all of its dependencies are only being searched for in the source repo. Is this just a misinterpretation of the output generated by easy_install? BTW, it would be nice if there was an option to name your generated eggs based on a full specification of OS and version, hardware arch, etc. And of course, the whole setuptools universe of tools would need to know to search for eggs with that level of accuracy before dropping down to more generic specs. Another similar use case: Some of our users want to locally cache eggs for distribution within their corporate environment for various reasons (eggs tested and approved to work with their corporate desktop standard, etc.) Those users would also be specifying a '-f' option to easy_install to point at their corporate cache. However, all of our eggs will have dependency_links specified. Will these corporate users be able to install and pull things from their local repository, or will easy_install always look at our dependency_links' specified locations first? It doesn't seem convenient to force them to have to remember to provide a '-H' setting, though I guess their IT group could create an alias or batch script that does this for them. I also guess that their IT group could generate their own version of easy_install that customizes / hard-codes the URLs that it would look at, but that seems like kind of a long way to go to solve this problem. -- Dave
At 01:38 PM 8/16/2007 -0500, Dave Peterson wrote:
What happens if a user specifies a URL via a '-f' option on the easy_install command line but our published eggs specify dependency_links in the setup.py? Will easy_install search the user's specified location first, last, or will it not search them at all? (I'm hoping for the first!)
The precedence is determined by the versions and urls specifically being searched, not by the order in which -f options are specified. The user's -f options will be searched first, but the eggs' dependency_links will also be searched.
But early indications are that when a user installs by doing something like: easy_install -f <enthought platform specific repo url> ets==2.5b2 then the first egg gets found properly in the platform specific repo, but all of its dependencies are only being searched for in the source repo. Is this just a misinterpretation of the output generated by easy_install?
Probably; each new set of dependency links is just treated as if they were added to the -f list. And the binary eggs should be given preference to the source tarballs, assuming that they are for the same target version, or you explicitly request a specific version.
BTW, it would be nice if there was an option to name your generated eggs based on a full specification of OS and version, hardware arch, etc. And of course, the whole setuptools universe of tools would need to know to search for eggs with that level of accuracy before dropping down to more generic specs.
The optimal spelling of platform strings is an open issue. Unfortunately, I don't have any good solutions, and nobody has stepped forward with a solid design proposal.
Another similar use case: Some of our users want to locally cache eggs for distribution within their corporate environment for various reasons (eggs tested and approved to work with their corporate desktop standard, etc.) Those users would also be specifying a '-f' option to easy_install to point at their corporate cache. However, all of our eggs will have dependency_links specified. Will these corporate users be able to install and pull things from their local repository, or will easy_install always look at our dependency_links' specified locations first?
The precedence system doesn't work this way; distributions have precedence, --find-links and dependency_links don't. So, unless they are requesting a specific version, a newer source version on your servers will take precedence over an older binary version on their local system.
participants (2)
-
Dave Peterson
-
Phillip J. Eby