views:

172

answers:

2

I'm trying to install an egg on a computer where an identical egg already exists. Why does it remove the egg and then re-install it? I'm calling easy_install from a script with the options:

['-v', '-m', '-f', 'R:/OPTIONS/Stephen/python_eggs', 'mypkg==1.0_r2009_03_12']

While running the easy_install command this was observed:

Searching for mypkg==1.0-r2009-03-12
Best match: calyon 1.0-r2009-03-12
Processing calyon-1.0_r2009_03_12-py2.4-win32.egg
Removing d:\devtools\python24\lib\site-packages\mypkg-1.0_r2009_03_12-py2.4-win32.egg
Copying mypkg-1.0_r2009_03_12-py2.4-win32.egg to d:\devtools\python24\lib\site-packages

What causes this? Why is it that some times the egg is removed and re-installed, and on other occasions the egg is preserved? I've seen it happen a few times on my own PC but I'm not sure how to consistently re-produce the behavior.

I'm using setuptools 0.6c9

A: 

It may show up on the bug list, otherwise it'd be best to report it.

Jweede
+2  A: 

Here is what I am guessing is happening... This is a guess based on your description of the symptoms.

Assuming in your example mypkg and calyon are the same, the use of -r2009-03-12 on the end of your is not an expected format for setuptools (the standard format for post release tags is without hyphens YYYYMMDD) so it cannot ensure that the current version is up to date. Check out the links below and make sure you are versioning correctly.

Additionally, I believe easy_install manages its version info in the easy-install.pth file. What does your easy-install.pth file say about your package?

http://peak.telecommunity.com/DevCenter/setuptools#specifying-your-project-s-version http://peak.telecommunity.com/DevCenter/setuptools#tagging-and-daily-build-or-snapshot-releases

Jeffrey Hulten