At 04:20 PM 9/21/2011 +0200, Tristan Seligmann wrote:
If you include "twisted.plugins" in your setup.py, then this works fine with distutils "setup.py install" as well as "pip install"; setuptools "setup.py install" will install everything into an egg, which will also work due to the way __path__ is set. However, since "twisted" ends up in top_files.txt in the egg-info, "pip uninstall" will blow away your whole Twisted install when uninstalling a project shipping Twisted plugins that was installed with "pip install".

This really sounds like a bug in pip; top_level.txt is not a replacement for a proper uninstall log.

So, how should Twisted and Twisted-related projects be packaged in order to avoid these issues? Please bear in mind that the current plugin system in Twisted was first introduced around March 2005 (replacing the even older plugin system in use at the time, I believe), thus there are quite a number of users relying on this code; any changes would need to be backwards-compatible to avoid causing problems for all of the existing projects and users relying on the functionality.

I think you've answered your own question here: there *isn't* any way to package Twisted-related projects in a way that avoids the issue, due to the bug in pip. It's not Twisted's fault that pip takes shortcuts here.

_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to