Okay, I read the README.  It basically says three things regarding this
issue:

1. That some python "modules" rely on the absence of __init__.py in some
directories, and that those python packages are broken.

That may be true, but my package is not one of them.  It has its own
__init__.py, placed exactly where it should be.

2. That python-support will create empty __init__.py files as needed,
after postinst.

I guess that might be a handy feature for the aforementioned broken
python packages, but my python package is not one of them.  It has its
own __init__.py, placed exactly where it should be.  Having python-
support ignore it and create a new one later only serves to create
confusing and broken behavior.  Having python-support behave this way
only sometimes (when the file happens to be zero bytes) makes it even
more confusing and arguably even more broken.

3. That a postinst script can coerce python-support to create
__init__.py earlier by calling update-python-modules -p before starting
a python daemon.

Again, I don't want python-support creating __init__.py for me at all.
My python package already has one.  I want python-support to simply
respect the one that is already there, copy it into the correct place
when dh_pysupport runs, and let it be unpacked when the deb package is
installed.  This is (thankfully) what it does when my __init__.py
contains at least one byte.  I expect it to do the same when it contains
zero bytes.


Side Note 1:  The deb maintainer doesn't write the postinst code that starts 
the daemon.  That code is added automatically by debhelper, as is the 
update-python-modules call, so expecting the deb maintainer to insert a special 
command line option and arrange the sequence events a certain way is a bit less 
than helpful.

Side Note 2:  The README claims that "namespace packages are empty __init__.py 
files."  I'm not sure where the author got that idea, but it's not correct.  I 
suppose some namespace packages may contain an empty __init__.py, but other 
python packages contain them as well, and a namespace package is not simply an 
__init__.py file.
http://docs.python.org/tutorial/modules.html#packages
http://www.python.org/dev/peps/pep-0382/

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/716789

Title:
  dh_pysupport fails to move zero-byte __init__.py

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to