[Twisted-Python] Subproject releases
James Y Knight
foom at fuhm.net
Wed Oct 12 10:13:18 MDT 2005
On Oct 12, 2005, at 1:49 AM, glyph at divmod.com wrote:
> The Divmod repository is now organized this way, and we have a tool
> (Combinator) which keeps PYTHONPATH from exploding into a million
> pieces that kill you. For an example of this repository structure
> see <http://divmod.org/trac/browser/trunk>.
AFAIU, Combinator doesn't solve the problem of twisted.words,
twisted.internet, and twisted.web being in separately distributed
packages. Of course, that's "only" an issue while developing, because
on install, you either use setuptools magic or else install
everything into the same directory hierarchy.
As an experiment, I've tried rearranging my local hierarchy with
separate dirs for each project, as follows:
core/admin/...
core/doc/...
core/twisted/{application,cred,internet,...}
web2/twisted/web2/
web2/doc/...
Then, created a wrapper to combine them:
twisted/__init__.py:
> import os.path
> __path__=["core/twisted", "web2/twisted"]
> __path__=[os.path.abspath(os.path.join(os.path.dirname(__file__),
> "..", elt)) for elt in __path__]
> import copyright
> __version__ = copyright.version
> from twisted.python import compat
> del compat, os
With this setup, things seem to mostly work, besides twisted.plugin,
which doesn't work because of plugins' insane magic. I suspect
there's some way to make that work though. So, I think the
rearrangement is probably doable without too much pain.
James
More information about the Twisted-Python
mailing list