--always-copy, development eggs

So, I'm trying to achieve a couple different things with workingenv, and I'm not sure how to make it all work... I don't want one workingenv to have unintentional links to package in another environment. Sometimes easy_install will find a package somewhere else on the system, which is fine, but I want it to copy it into the workingenv. I thought the easy thing was to add "[easy_install] always_copy = True" to distutils.cfg. And this works. *But* always_copy doesn't work with develop eggs. So specifically there's a problem if I want to install both distribution A and B as editable/develop eggs, and B depends on A. I can install (via setup.py develop) A, and then install B, but B fails with something like error: Could not find suitable distribution for Requirement.parse('A==0.1') (--always-copy skips system and development eggs) Note that 'A==0.1' is something easy_install/setuptools came up with, B only requires 'A'. So, it seems having always_copy on really gets in the way of development eggs. Is there another way I can avoid sharing packages without always_copy? Or... something, I'm not sure. -- Ian Bicking | ianb@colorstudy.com | http://blog.ianbicking.org

At 02:38 PM 2/21/2007 -0600, Ian Bicking wrote:
So, I'm trying to achieve a couple different things with workingenv, and I'm not sure how to make it all work...
I don't want one workingenv to have unintentional links to package in another environment. Sometimes easy_install will find a package somewhere else on the system, which is fine, but I want it to copy it into the workingenv.
I think the problem is that you haven't sufficiently specified what you mean by "copy it into the workingenv". For example, do you want to install a snapshot by creating an egg, or do you want to copy an .egg-link file? For the use case --always-copy was created for, the former is what's desired, and it may someday implement that by running the setup.py. The problem is that right now there's no way to know for sure *which* setup.py created the development egg. One can certainly *guess* that the first setup.py found in the same or a higher-level directory than that containing the .egg-info is the correct one, but it may not always be the case. Some packages have a separate setup.py (that's not *named* setup.py) that would need to be used. I could put something in the .egg-info directory, but it would need to *not* be installed by system packaging tools, because then it would no longer be pointing to the right place. So, if I were to store a link to the setup.py, it would need to be stored in the .egg-link file itself, where easy_install could potentially get to it. As an experiment, I just tried changing the way "develop" and package_index work so that setup scripts can be found automatically, and the appropriate bdist_egg step run. It seems to work okay, except that I'm not sure if we really *want* development eggs to be automatically snapshotted like this, without including some sort of extra "local builds okay" flag. So, the trunk and 0.6 branch now include a --local-snapshots-ok flag you can use to enable this behavior. I don't know if it's exactly what you're looking for, but it at least provides you with one way of handling it.
participants (2)
-
Ian Bicking
-
Phillip J. Eby