[Python-Dev] PEP 382: little help for stupid people?

"Martin v. Löwis" martin at v.loewis.de
Sat May 9 05:27:22 EDT 2009

>> Ok, so create three tar files:
>> 1. base.tar, containing
>>    simplistix/
>>    simplistix/__init__.py
> So this __init__.py can have code in it? 

That's the point, yes.

> And base.tar can have other modules and subpackages in it?

Certainly, yes.

> What happens if the base and an addon both define a package called
> simplistix.somepackage?

Depends on whether simplistix.somepackage is a namespace package
(it should). If so, they get merged just as any other namespace

>> 2. addon1.tar, containing
>>    simplistix/addon1.pth (containing a single "*")
> What does that * mean?

See PEP 382 (search for "*").

> I thought .pth files just had python in them?

Not at all - they never did. They have paths in them.

>> Unpack each of them anywhere on sys.path, in any order.
> How would this work if base, addon1 and addon2 were eggs managed by
> buildout or setuptools?

What is a managed egg (i.e. what kind of management does buildout
or setuptools apply to it)?


More information about the Python-list mailing list