Le jeudi 09 juin 2005 à 10:47 -0400, Jeff Bailey a écrit :
> python2.4 setup.py config
> python2.4 setup.py build
> (etc...)
> 
> Which causes the bzrlib library to be installed into:
> 
> /usr/lib/python2.4/site-packages/bzrlib/
> 
> Right now, Line 76 of dh_python determines the $python_version based on
> the $python variable.
> Line 99 and 100 override $python to be python2.4, but don't update the
> python_version variable.
> 
> Where this becomes a problem is on line 142, where the site-packages
> directory is scanned based on usr/lib/python
> $python_version/site-packages
> 
> It doesn't see the files in the library, and so doesn't cause the prerm
> and postinst debhelper stubs to get generated.

Indeed, when -V is set, the wrong /usr/lib/python2.X/site-packages
directories are searched. Does the following patch work for you?

--- /usr/bin/dh_python  2004-12-14 19:08:50.000000000 +0100
+++ dh_python   2005-06-09 19:41:25.196693440 +0200
@@ -139,8 +139,8 @@
                }
        }
        if ($package !~ /^python[0-9].[0-9]-/) {
-               push @dirs, "usr/lib/python$python_version/site-packages" ;
-               push @dirs_so, "usr/lib/python$python_version/site-packages" ;
+               push @dirs, "usr/lib/$usepython/site-packages" ;
+               push @dirs_so, "usr/lib/$usepython/site-packages" ;
                $look_for_pythonXY = 0;
        }

> Your explanation of the -V variable doesn't match what that man page
> says, which might be the source of my confusion.  In this case, the .py
> files are intended to be used with 2.4, and are not being shipped
> in /usr/lib/site-python so the usage of -V seems to be right.

Yes, I thought of the case where the package ships private modules for a
specific version (like Zope does), not of the case where it ships public
modules for a specific version.

Regards,
-- 
 .''`.           Josselin Mouette        /\./\
: :' :           [EMAIL PROTECTED]
`. `'                        [EMAIL PROTECTED]
  `-  Debian GNU/Linux -- The power of freedom

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to