Bug#236606: [PATCH]: lintian should warn about compiled python source files (.pyc)
Package: lintian
Version: 1.22.11
Severity: wishlist
Tags: patch
Hi,
Based on :
http://lists.debian.org/debian-python/2001/debian-python-200109/msg00069.html
and the behavior of dh_python .pyc files should not be included in
packages. I don't know if a more official reference exists. Someone
more familiar with python should probably comment on this (that is
when joss is cc'd here).
Anyway I have had more than one bug about .pyc file in the
python2.3-subversion package :
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=236170
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=225564
so now I am removing them which looks like the right thing to do.
-David
* checks/files.desc, checks/files : Add new check to warn if a
package includes compiled python source files.
Index: lintian-1.22.11/checks/files.desc
===================================================================
--- lintian-1.22.11.orig/checks/files.desc 2004-02-08 23:52:57.000000000 +0100
+++ lintian-1.22.11/checks/files.desc 2004-03-07 13:28:36.000000000 +0100
@@ -427,3 +427,9 @@
Type: warning
Info: Architecture-independent Perl code should be placed in
<tt>/usr/share/perl5</tt>, not <tt>/usr/lib/perl5</tt>.
+
+Tag: package-installs-python-pyc
+Type: warning
+Info: Compiled python source files should not be included in the package.
+ These files should be removed from the package and created at package
+ installation time in the postinst.
Index: lintian-1.22.11/checks/files
===================================================================
--- lintian-1.22.11.orig/checks/files 2004-02-09 00:12:24.000000000 +0100
+++ lintian-1.22.11/checks/files 2004-03-07 13:29:49.647660161 +0100
@@ -326,6 +326,9 @@
print "W: $pkg $type: third-party-package-in-python-dir $file\n"
unless $is_python;
}
+ if ($file =~ m,^usr/lib/python\d\.\d/.*.pyc$,) {
+ print "W: $pkg $type: package-installs-python-pyc $file\n"
+ }
# ---------------- perl modules
if ($file =~ m,^usr/(share|lib)/perl/\S,) {
# check if it's the "perl" package itself
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing')
Architecture: powerpc (ppc)
Kernel: Linux 2.6.3-ben2
Locale: LANG=C, LC_CTYPE=C
Versions of packages lintian depends on:
ii binutils 2.14.90.0.7-5 The GNU assembler, linker and bina
ii diffstat 1.34-1 produces graph of changes introduc
ii file 4.07-2 Determines file type using "magic"
ii man-db 2.4.2-12 The on-line manual pager
ii perl 5.8.3-2 Larry Wall's Practical Extraction
-- no debconf information
Reply to: