Hints for maintainers of Debian GNUe packages --------------------------------------------- [Also look at /usr/share/doc/python/README.maintainers for general hints about packaging Python stuff in Debian.] Naming issues ------------- Note that naming conventions for Python packages differ from the precedent set by Perl. While Perl packages are named libfoo-bar-perl, Python extension module packages are named python-foo-bar. Packages embedding Python in an application are named foo-bar-python (e.g. gimp-python). Since Zope is closely related with Python, we go with the Python convention: Debian Zope packages should be named gnue-foo-bar. Since many Product names are starting with a "Z" (e.g. ZMySQLDA), you may choose to drop that "Z", i.e. gnue-mysqlda. Dependencies ------------ gnue modules must depend on: gnue (>= 2.4), gnue (<< 2.5). Paths ----- Zope Product packages should be installed in the directory /usr/lib/gnue/lib/python/Products. Miscellaneous ------------- Python modules run faster if they're already precompiled into .pyc files. python-base includes a small tool that traverses a directory tree and byte-compiles all .py files: python2.1 /usr/lib/python2.1/compileall.py [-d destdir] [directory ...] -l: don't recurse down -f: force rebuild even if timestamps are up-to-date -q: quiet operation -d destdir: purported directory name for error messages if no directory arguments, -l sys.path is assumed You should either use this tool in debian/rules like this: python2.1 /usr/lib/python2.1/compileall.py \ -d/usr/lib/gnue/lib/python/Products \ `pwd`/debian/tmp/usr/lib/gnue/lib/python/Products (which will byte-compile all files in the debian/tmp Products directory and make them look like they were installed in /usr/lib/gnue/lib/python/Products) --in this case you will ship the .pyc files with the package, which makes the package significantly larger, or you should use the tool in the postinst of the package, and remove the .pyc files in the prerm. Look at the templates included with python-base: /usr/share/doc/python/sample.{postinst,prerm}. This will make installation of the package a little bit slower. If the .py files use DOS/Windows line endings, compileall.py will fail to compile them. The easiest fix is to convert them to Unix line endings (recode should do) before packaging. This README was shamelessly borrowed from the Zope folks. Thanks, guys. Fri, 04 Oct 2002, Jason Cater Last change: 04 Oct 2002