[Twisted-Python] Progress report on splitting packages

Fred L. Drake, Jr. fdrake at acm.org
Tue Apr 20 16:02:12 EDT 2004


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.

Yes, I've tested this behavior with Zope 3 packages.

Does this answer your question?  I'll be glad to elaborate if needed.


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation





More information about the Twisted-Python mailing list