[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: LP: #809951 (untagged extensions)



[Barry Warsaw, 2011-07-27]
> Martin Pitt discovered this problem in dh_python3:
> 
> https://bugs.launchpad.net/ubuntu/+source/python3-defaults/+bug/809951
> 
> Even in a post-PEP 3149 world, Python 3.2 itself can import untagged .so files
> (which preserves backward compatibility).  python3-gobject's build system does
> not tag .so files even when it's built with Python 3.2.

imagine this:
* package built with python3.1
* dh_python3 doesn't add a tag
* python3 package upgrade starts requiring python3.2 instead of python3.1

python3.2 will fail with untagged foo.so, no?

> I'm not entirely sure how to handle this, but I think this bit of code in
> dh_python3 should not hardcode vers==31:

I assumed that build systems that do not know about changes in Python
3.2 will not use new location (/usr/lib/python3/) and dh_python3
recognizes /usr/lib/python3.X/ paths correctly.

I guess I can change it to use python3's tag if 3.1 is not in a list of
supported Python 3 versions (but I still think that the build system
should be fixed in the first place)

> Probably, it should query the version of Python being used, with something
> like:
> 
> $ python3 -c "import sysconfig; print(sysconfig.get_config_var('SO'))"
> .cpython-32mu.so

I will change debpython.tools.get_magic_tags_map to use this (right now
it uses imp.get_tag() and fix tagged_extname)
-- 
Piotr Ożarowski                         Debian GNU/Linux Developer
www.ozarowski.pl          www.griffith.cc           www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645


Reply to: