[Twisted-Python] how to depend (in a setuptools sense) upon Twisted?
We've hit a problem in the Tahoe packaging scheme: we kind of want to use the setuptools install_requires= feature to declare that Tahoe depends upon Twisted (as well as other things). This allows someone to type "easy_install allmydata-tahoe" and get everything built for them. It also allows our build process to download and build anything that the user doesn't already have on their system, making the build process much easier. The trouble that we've run into is that various flavors of linux have made different decisions about which setuptools "distribution" names to use. (Note that these "distribution names" are the name= arguments to setup(), as opposed to the python package names like or module names. Distribution names tend to map to debian package names.) http://allmydata.org/trac/tahoe/ticket/378 has more details, but basically Ubuntu is shipping .egg_info data that declares that the "Twisted" distribution is installed, whereas debian sid is shipping data that says "Twisted-Core" is installed. Since the setuptools dependency syntax is not rich enough to provide alternatives, the Tahoe setup.py is forced to choose between depending upon "Twisted" or upon "Twisted-Core". The drawback for choosing the opposite of the target platform is that users on that platform will find their tahoe builds downloading and building the whole Twisted-8.0.1 tarball, despite having a perfectly functional twisted-2.5.0 installation already present. This is annoying. We haven't figured out a good resolution to this problem yet. The best answer I can think of would be to change the tahoe setup.py script to change the dependencies that it declares based upon what is currently installed. This would be a bit wonky but might avoid spurious download+builds. Another answer might be for the debian 'python-twisted' metapackage (which depends upon python-twisted-core, python-twisted-web, etc) to provide an .egg-info that claims to represent the 'Twisted' distribution, but I can imagine problems with that. Another possibility would be for the Ubuntu python-twisted-core package to install two .egg-info files, the one for 'Twisted' that they're already doing, and another for 'Twisted-Core'.. if that were the case, we could have Tahoe depend upon 'Twisted-Core ' and 'Twisted-Web' and be done with it. So, no answers, but we're bringing up the issue in case anyone else has run into a similar problem, or has some bright ideas on the subject. cheers, -Brian
On Thu, Apr 10, 2008 at 3:57 PM, Brian Warner <warner@lothar.com> wrote:
http://allmydata.org/trac/tahoe/ticket/378 has more details, but basically Ubuntu is shipping .egg_info data that declares that the "Twisted" distribution is installed, whereas debian sid is shipping data that says "Twisted-Core" is installed. Since the setuptools dependency syntax is not rich enough to provide alternatives, the Tahoe setup.py is forced to choose between depending upon "Twisted" or upon "Twisted-Core".
[stuff about how somebody distributes an .egg for Twisted-Core] This may not be helpful, but it is additional data: Twisted subprojects are not easy_installable in any reasonable way. The only thing that it makes sense to easy_install right now is "Twisted". This has to do with the way easy_install attempts to install non-root packages. Anyway, maybe it makes sense to depend on "Twisted Core" sometimes to workaround buggy Debian cruft, but bad things will happen if this results in easy_install ever attempting to download Twisted Core as opposed to Twisted. -- Christopher Armstrong International Man of Twistery http://radix.twistedmatrix.com/ http://twistedmatrix.com/ http://canonical.com/
On Apr 10, 2008, at 1:17 PM, Christopher Armstrong wrote:
This may not be helpful, but it is additional data: Twisted subprojects are not easy_installable in any reasonable way.
This is relevant; thanks for the information. Brian Warner wrote:
Another answer might be for the debian 'python-twisted' metapackage (which depends upon python-twisted-core, python-twisted-web, etc) to provide an .egg- info that claims to represent the 'Twisted' distribution, but I can imagine problems with that.
What problems? That's what Ubuntu Hardy currently does. The "python- twisted" Debian package currently provides the "Twisted" distutils distribution, but it doesn't currently declare that it does so in a machine-readable way. Regards, Zooko
participants (3)
-
Brian Warner -
Christopher Armstrong -
zooko