Package: dh-python Version: 1.20140128-1 Severity: normal -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Dear Maintainer, I've been playing with <pkg>.pyremove with dh_python3, specifically in the genshi project. Python 3.4 added a new 2to3 fixer which rewrites deprecated assert methods. For genshi, this means that the effects of 2to3 differ between Python 3.3 and 3.4 for some files. This difference prevents dh_python3 from moving the files to a common location (i.e. /usr/lib/python3/dist-packages/genshi/...). The result of this is that the python3-genshi binary package ends up with ./usr/lib/python3.4/dist-package paths, which lintian does not like. There are a couple of solutions to this: Piotr recomments an override_dh_python3 rule to remove the pythonX.Y specific paths before calling dh_python3. (i.e. rm -rf). I prefered to add a python3-genshi.pyremove file, however the contents of that file must be: /genshi/* 3.4 /Genshi.egg-info/* 3.4 to clean everything up. Here then are some suggestions for improving the use of .pyremove. * The dh_python3 manpage should document <pkg>.pyremove. It's documented in dh_python2, but not dhpy3. * Both documents should be explicit about what the paths are relative to. In particular it's debian/<pkg>/usr/lib/pythonX.Y/{site,dist}-packages * In dh_python3's .pyremove file, the construction of the glob path forgets that the directories returned by: site_dirs = interpreter.old_sitedirs(package, version) site_dirs.append(interpreter.sitedir(package, version)) don't end in slashes, so the contents of <pkg>.pyremove must start with slashes (see above). I think pyremove() should check for leading slash and add it if it's missing. * To remove an entire directory, you should not need to add a trailing "/*" In summary, the python3-genshi.pyremove file should only need to contain this to work properly: genshi 3.4 Genshi.egg-info 3.4 Thanks! - -- System Information: Debian Release: jessie/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 3.13-1-amd64 (SMP w/1 CPU core) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages dh-python depends on: pn python3:any <none> dh-python recommends no packages. dh-python suggests no packages. - -- no debconf information -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCAAGBQJTH4BqAAoJEBJutWOnSwa/xfsQAKwgTkEyS+MXfBcIuQDQdKDn Jmtd9Iu2t6nsUOBi2JDg3dlTOYsfgRc4p0tHJKqm7btl2p8DHlHvh6WXSz26gk6A tl0Knyc3GRVupUrGZtEnZvb4uWQ8JyE0dDKb5j8S5kd9K5/I6Ag+bK/K4mKfP9eo /yaGOvWQI3KFW12cJUED7XXK5lu/PcofYtb5SUUCOXczt10FbXes9l0/FEAKYhuh VJve4VvNQWnnufsEWFAuNxq57qEGgrXnw8CwcFybmD6SOulTPDDBD7r1Mjvraxgn YZpABAOftQMxht78qDI+NtX00IuVN7Eb45h+EkQlmKRByxSm8NBZYMpsbUmkyou7 atLEBYnpn4prq/GT0An3rU/a+Qr1BB8FAvzR26ZPX5sdL1d+eFpjz6THim36/V8z JqZvXvlH9fMUUHFgIju0qkC1DQuIldv45r41AiyhmnZwhFq4SKiVoilaUluw9sHF AkLnnv2+TlNU1B5SBuo5Wa+i5JOGQXIzpO0ya2OAzzI4e06QGh5GlUiDE+O9Xxy+ t4Su7kHf9ojFDzxlC5ao6suzLnBWkNnhEVLB5WNb7d0Q/Ueu2Vsifh4Wr0aBtYRj rWITUyKcGzE01frnNQUnl5CFu0E7tlBg0M8BwInrfJqAsTuj4JsKT5foq0Ig7alX 9JH5JhfdVXaqbDaVQ8ov =3AcZ -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org