dh_python2 and /usr/share/pyshared in quantal

Matthias Klose doko at ubuntu.com
Wed May 23 01:49:07 UTC 2012


On 22.05.2012 23:42, Scott Kitterman wrote:
> On Tuesday, May 22, 2012 11:33:18 AM Barry Warsaw wrote:
>> For example, I took a look at authres which uses dh_python2.  debian/rules
>> creates a symlink in pyshared to its test suite, and then
>> d/python-authres.install references pyshared.  Even after reading the
>> changelog entry, it's not clear to me why this particular solution was
>> chosen. Fortunately the maintainer is here and can probably answer that
>> <wink>.
> 
> In that case it's because I had to install an extra, non-code, file for the 
> test suite that dh_python2 didn't recognize should go there.  Arguably that's 
> something I should be able to accomplish by configuring dh_python2, but it's a 
> rare enough situation installing directly to the correct location makes sense.
> 
> I've got another case (pyspf) where I needed a symlink that would work 
> regardless of if the default Python version was used.
> 
> /usr/share/pyshared is the correct location for such things.  That's what 
> Python policy says.  pyshared is not an internal implementation detail of 
> dh_python2.  It's where Python policy says to find such things.

that is plain wrong. pyshared *is* an implementation detail for the working of
the package. Every package having pyshared on sys.path for testing, building,
installation is buggy.

So i'll modify the interpreter do disallow imports from pyshared to catch
exactly these misuses.


> I think it's an open question about we want to remove the general ability in 
> the Debian Python system to support multiple Python versions.

no, it's not about that.

> It's a much 
> broader question than just /usr/share/pyshared.  I don't think that there is 
> any reason for Ubuntu to try and get ahead of Debian for this.

Again, no. Debian probably will only start such things after their next release,
so it's legitimate to go ahead witch changes for 28 packages.

thanks, Matthias

PS: Scott, if you choose to move a discussion from a bug report to a ML, please
mention this in the bug report next time.



More information about the ubuntu-devel mailing list