In other packages that have namespaces but not an obvious main package, I have added a separate binary package. Example is z3c.form that also builds a python-z3c package that only contains the __init__.py. This tiny package has a version that does not mean anything, but that's hardly a problem.
$ tail -n 5 debian/control
Package: python-z3c
Architecture: all
Depends: ${python:Depends}, python-pkg-resources, ${misc:Depends}
Description: z3c namespace package
Namespace package for all z3c.* packages to depend on.
This was done before dh_python2, and I tried to remove it and rely on dh_python2 creating empty __init__.py files, but it is bad for upgrades, because that file may not be available. I've seen python break after removing a package from that namespace (cannot import site.py)
Also this was needed because van-pydeb helper adds namespace packages like python-z3c to Depends. python-lazr would have to be added to Depends of all lazr.* packages manually...
In other packages that have namespaces but not an obvious main package, I have added a separate binary package. Example is z3c.form that also builds a python-z3c package that only contains the __init__.py. This tiny package has a version that does not mean anything, but that's hardly a problem.
menesis@ ore:~/src/ ubuntu/ precise/ z3c.form python- z3c.form. install ore:~/src/ ubuntu/ precise/ z3c.form python- z3c.pyinstall
$ cat debian/
debian/tmp/*
menesis@
$ cat debian/
src/z3c/__init__.py z3c
$ tail -n 5 debian/control pkg-resources, ${misc:Depends}
Package: python-z3c
Architecture: all
Depends: ${python:Depends}, python-
Description: z3c namespace package
Namespace package for all z3c.* packages to depend on.
This was done before dh_python2, and I tried to remove it and rely on dh_python2 creating empty __init__.py files, but it is bad for upgrades, because that file may not be available. I've seen python break after removing a package from that namespace (cannot import site.py)
Also this was needed because van-pydeb helper adds namespace packages like python-z3c to Depends. python-lazr would have to be added to Depends of all lazr.* packages manually...