Bug#372748: Deprecating /usr/lib/site-python in python policy

2006-06-11 Thread Thomas Viehmann
tag 372748 +patch
thanks

Dafydd Harries wrote:
 Ar 11/06/2006 am 14:35, ysgrifennodd Raphael Hertzog:
 Someone should file a wishlist bug on lintian to check that packages don't
 use /usr/lib/site-python any more.
 Done: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=372748
Maybe the attached patch is useful.

Kind regards

T.
-- 
Thomas Viehmann, http://thomas.viehmann.net/
diff -burN lintian-1.23.21/checks/files lintian-1.23.21.tv0/checks/files
--- lintian-1.23.21/checks/files	2006-05-04 05:37:21.0 +0200
+++ lintian-1.23.21.tv0/checks/files	2006-06-11 21:13:33.0 +0200
@@ -448,6 +448,10 @@
 	tag package-installs-python-pyc, $file
 }
 
+#  /usr/lib/site-python
+if ($file =~ m,^usr/lib/site-python/,) {
+	tag file-in-usr-lib-site-python, $file
+}
 #  pythonX.Y extensions
 if ($file =~ m,^usr/lib/python\d\.\d/\S,
 	and not $file =~ m,^usr/lib/python\d\.\d/site-packages/,) {
diff -burN lintian-1.23.21/checks/files.desc lintian-1.23.21.tv0/checks/files.desc
--- lintian-1.23.21/checks/files.desc	2006-05-04 05:37:21.0 +0200
+++ lintian-1.23.21.tv0/checks/files.desc	2006-06-11 18:36:34.0 +0200
@@ -360,6 +360,12 @@
 Info: Debian packages should not install into tt/opt/tt, because it
  is reserved for add-on software.
 
+Tag: file-in-usr-lib-site-python
+Type: error
+Info: The directory /usr/lib/site-python has been deprecated as a
+ location for installing Python packages. Packages should use
+ /usr/share/$package instead.
+
 Tag: third-party-package-in-python-dir
 Type: warning
 Info: According to a href=http://www.python.org/doc/essays/packages.html;


Bug#372748: Deprecating /usr/lib/site-python in python policy

2006-06-11 Thread Raphael Hertzog
On Sun, 11 Jun 2006, Thomas Viehmann wrote:
 --- lintian-1.23.21/checks/files.desc 2006-05-04 05:37:21.0 +0200
 +++ lintian-1.23.21.tv0/checks/files.desc 2006-06-11 18:36:34.0 
 +0200
 @@ -360,6 +360,12 @@
  Info: Debian packages should not install into tt/opt/tt, because it
   is reserved for add-on software.
  
 +Tag: file-in-usr-lib-site-python
 +Type: error
 +Info: The directory /usr/lib/site-python has been deprecated as a
 + location for installing Python packages. Packages should use
 + /usr/share/$package instead.

I suggest this:
Info: The directory /usr/lib/site-python has been deprecated as a
 location for installing Python modules. Please check the Python policy.
 Most likely the modules are private modules and should be
 packaged in a directory outside of Python's default search path.

Cheers,
-- 
Raphaël Hertzog

Premier livre français sur Debian GNU/Linux :
http://www.ouaza.com/livre/admin-debian/