[Twisted-Python] Components

Phillip J. Eby pje at telecommunity.com
Thu Feb 26 17:58:54 EST 2004

At 05:32 PM 2/26/04 -0500, Bob Ippolito wrote:

>On Feb 26, 2004, at 4:44 PM, Phillip J. Eby wrote:
>>At 03:42 PM 2/26/04 -0500, Donovan Preston wrote:
>>>I am less excited about introducing a dependency into Nevow. It would be 
>>>nice if we could distribute PyProtocols in the same tarball as Nevow and 
>>>only install it if needed.
>>The (dual PSF/ZPL) license permits that.  And, PyProtocols, is getting 
>>pretty stable, so it's not like you'd be updating it every day.
>>But naturally, working on dependency support for distutils seems to be an 
>>Idea Whose Time Is Coming.  There was a recent Zope3-Dev thread about 
>>such issues, although it was more specific to bundling subsets of the 
>>Zope3 system, rather than bundling third-party packages.
>Yeah, the dependency/package management stuff is also brought up every so 
>often on the distutils-sig and pythonmac-sig .. the problem is that nobody 
>wants to actually hack on the nasty distutils source to finish the work.. 
>except maybe amk :)

The sad thing to me is, that it's not that difficult, at least in 
principle.  For example, I frequently create "pkgsrc" (similar to BSD 
ports) packages wrapping distutils-built Python libraries.  Generally 
speaking, this amounts to writing a short makefile like:

DISTNAME=       mechanize-0.0.7a
CATEGORIES=     3rdParty
MASTER_SITES=   http://wwwsearch.sourceforge.net/mechanize/src/

PYMODULE_DIRS=  mechanize
MAINTAINER=     pje at eby-sarna.com
HOMEPAGE=       http://wwwsearch.sourceforge.net/mechanize/
COMMENT=        Stateful programmatic web browsing in Python

DEPENDS+=       ${PYPKGPREFIX}-pullparser>=0.0.4b:../../3rdParty/py-pullparser
DEPENDS+=       ${PYPKGPREFIX}-ClientForm>=0.1.14:../../3rdParty/py-ClientForm


.include "../../3rdParty/3p-pkgutils/py-plist.mk"
.include "../../lang/python/extension.mk"
.include "../../mk/bsd.pkg.mk"

This is one of the most *complicated* such files I've written.  But, using 
this I can run 'make' and it will download and install all the dependencies 
for me!  In fact, if I don't have Python installed, it'll download and 
install Python for me, but that's a bit out of scope for the distutils, 
methinks.  :)

Maybe what's really needed is a tool that uses a file like the above to do 
the downloading, extracting, and running of setup.py, et al.  The main 
drawback I see is dealing with binary installers for e.g. Windows.

More information about the Twisted-Python mailing list