[Python-Dev] Dropping init.py requirement for subpackages (original) (raw)
Gustavo Carneiro gjcarneiro at gmail.com
Thu Apr 27 17:42:03 CEST 2006
- Previous message: [Python-Dev] Dropping __init__.py requirement for subpackages
- Next message: [Python-Dev] Dropping __init__.py requirement for subpackages
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 4/27/06, Thomas Wouters <thomas at python.org> wrote:
On 4/27/06, Gustavo Carneiro <gjcarneiro at gmail.com> wrote: > On 4/27/06, Phillip J. Eby < pje at telecommunity.com> wrote: > > > At 03:48 PM 4/27/2006 +0200, Bernhard Herzog wrote: > >"Gustavo Carneiro" <gjcarneiro at gmail.com > writes: > > > > > Now the problem. Suppose you have the source package > python-foo-bar, > > > which installs $pythondir/foo/init.py and > $pythondir/foo/bar.py. This > > > would make a module called "foo.bar" available. Likewise, you can > have the > > > source package python-foo-zbr, which installs > > $pythondir/foo/init.py and > > > $pythondir/foo/zbr.py. This would make a module called "foo.zbr" > > available. > > > > > > The two packages above install the file > $pythondir/foo/init.py. If > > > one of them adds some content to init.py, the other one will > overwrite > > > it. Packaging these two packages for e.g. debian would be extremely > > > difficult, because no two .deb packages are allowed to intall the > same file. > > > >Yet another solution would be to put foo/init.py into a third > >package, e.g. python-foo, on which both python-foo-bar and > >python-foo-zbr depend. > You can't be serious. One package just to install a init.py file? Sure. Have you counted the number of 'empty' packages in Debian lately?
Sure. That is already a problem; let's not make it a worse problem for no good reason; I haven't heard a good reason to keep the init.py file besides backward compatibility concerns.
Besides, Guido's original proposal is not a fix for your problem, either; he
only proposes to change the requirement for subpackages.
It is a solution for my problem. I don't need the init.py file for anything, since I don't need anything defined in the the 'foo' namespace, only the subpackages foo.bar and foo.zbr. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/python-dev/attachments/20060427/802a20f6/attachment.html
- Previous message: [Python-Dev] Dropping __init__.py requirement for subpackages
- Next message: [Python-Dev] Dropping __init__.py requirement for subpackages
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]