[Distutils] bdist_deb (was: Extending distutils with 3rd party
calvin at users.sourceforge.net
Tue Jan 18 12:56:47 CET 2005
-----BEGIN PGP SIGNED MESSAGE-----
On Mon, Jan 17, 2005 at 03:18:59PM -0800, Jeff Dairiki wrote:
> On the other hand, I haven't really heard a lot of feedback on it
> from, e.g., higher ups
> in the debian-python world, so you may or may not want to take my opinion with
> a grain of salt.
I reviewed the patch by testing it on the LinkChecker package
- - The remove_tree method in bdist_deb is also available in
dir_utils.py. I think it can be replaced with
from distutils.dir_utils import remove_tree
- - The bdist_deb.in_directory() utility function should probably be
moved to spawn.py so that other commands can use it too.
- - There is not a way to supply additional debuild options. My current
debuild options are used for signing the package
(-pgpg -sgpg -k$(GPGKEY)), and running automated package checks
linda and lintian (--linda --lintian-opts -i --linda-opts -i).
It might not be a bad idea to supply a generic --debuild-opts
and --dpkg-buildpackage-opts since I think most developers use
different options for debuild.
- - The dh_make command puts (in my case) the complete GPL text in
debian/copyright. To reduce disk usage the preferred way is to mention
only the name and refer to the complete text in
License: GPL , see /usr/share/common-licenses/GPL for more info.
Currently available entries in common-licenses directory:
- -rw-r--r-- 1 root 6111 Dec 16 1996 Artistic
- -rw-r--r-- 1 root 1499 Aug 26 1999 BSD
lrwxrwxrwx 1 root 5 Dec 17 14:04 GPL -> GPL-2
- -rw-r--r-- 1 root 17992 Sep 16 1999 GPL-2
lrwxrwxrwx 1 root 8 Dec 17 14:04 LGPL -> LGPL-2.1
- -rw-r--r-- 1 root 25284 Feb 2 2000 LGPL-2
- -rw-r--r-- 1 root 26528 Jul 21 2003 LGPL-2.1
- - The generated debian/rules executes dh_python. This needs a build
dependency on python which is currently not there.
- - When running debuild standalone (after python setup.py dh_make),
generating the PKG-INFO file fails in the case when setup.py imports
additional modules at the top. Here is the error I get:
$ debuild binary
Traceback (most recent call last):
File "<string>", line 1, in ?
File "/usr/local/lib/python2.5/distutils/core.py", line 218, in run_setup
execfile(script_name, g, l)
File "setup.py", line 292, in ?
include_dirs = include_dirs + \
File "setup.py", line 53, in normpath
NameError: global name 'os' is not defined
make: *** [debian/PKG-INFO] Fehler 1
The 'os' module is imported in setup.py at the top.
- - After running python setup.py dh_make there should be a note
reminding the packager that he has to review and edit the generated
files in the debian/ subdirectory.
- - Manpage stubs debian/*.1 for the scripts should only be generated when
such a file is not already installed. For example the setup.py from
LinkChecker already installs manpages when running on POSIX platforms:
- - Both commands dh_make and bdist_deb should probably not be run on
non-POSIX platforms. This should be documented. If you run it
on eg. a Windows platform, an appropriate error message should be
printed, something like this:
if os.name != 'posix':
print "This command is only available on POSIX systems"
print "Your current system is %s (%s)." % (os.name, sys.platform)
- - dh_make should also support generating packages relying on the
"default" Python version (according to section 3.1 of the Debian Python
Policy). This means there is a single package name (without the
"python-" prefix) depending on python (>= 2.3), python (<< 2.4).
Well, that's it for now :)
,''`. Bastian Kleineidam
: :' : GnuPG Schlssel
`. `' gpg --keyserver wwwkeys.pgp.net --recv-keys 32EC6F3E
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the Distutils-SIG