[Twisted-Python] Progress report on splitting packages
Bob Ippolito
bob at redivi.com
Tue Apr 20 16:01:57 MDT 2004
On Apr 20, 2004, at 5:41 PM, Christopher Armstrong wrote:
> Fred L. Drake, Jr. wrote:
>> On Tuesday 20 April 2004 01:09 pm, exarkun at divmod.com wrote:
>> > I mentioned "distutils tricks" a couple times. So far I have
>> heard both
>> > that distutils can and cannot do this. I suspect that it can, but
>> I would
>> > like to hear details on how this would work. In particular, I
>> would like
>> from distutils.core import setup
>> setup(packages=["twisted.foo"],
>> package_dir={"twisted.foo": "twisted_foo"}, # or wherever in
>> the dist.
>> ...)
>> > to know whether "twisted.foo" would exist before the "foo" project
>> was
>> > installed, and if it would, both what it would consist of and how
>> it would
>> > be treated when twisted core is being upgraded after the "foo"
>> project has
>> > been installed (can it cleanly avoid overwriting things?).
>> Whether it exists depends on whether the Twisted core includes a
>> package of the same name; I wouldn't include it unless it's part of
>> the core.
>> If the "core" includes the twisted package (pure container or not),
>> upgrading it does not affect child packages that aren't distributed
>> as part of the twisted core. So if you install twisted 1.1,
>> twisted.foo 1.2, then twisted 1.3, you have the core at 1.3 and
>> twisted.foo at 1.2.
>
> Well, this isn't quite a problem any more, since we're going to put
> stuff in 'tmlabs' instead of 'twisted' (according to the obvious favor
> from posters to this thread). However, what do you think the best way
> to make the 'tmlabs' top-level exist would be? I figure we can just
> put an empty 'tmlabs' directory right next to 'twisted' in our Twisted
> core package, containing only an empty __init__.py. setup.py could
> install it, and for people hacking out of SVN instead of using actual
> installations (for the developers of these projects), I'll write a
> little .pth file that makes this sane.
Well, instead of being empty, the __init__.py could have a really nice
docstring that says why it exists and how to get subpackages for it,
etc. :)
-bob
More information about the Twisted-Python
mailing list