[packages/python3] - use 'share' not 'lib' for platform independent files - rel 3

Jan Rękorajski j.rekorajski at gmail.com
Tue Apr 26 09:14:34 CEST 2016


On Mon, Apr 25, 2016 at 10:26 AM, Jacek Konieczny <jajcus at jajcus.net> wrote:

> On 2016-04-23 22:45, baggins wrote:
>
>> commit f69d21534e5f5805751fca202e9e2ae82cb10d35
>> Author: Jan Rękorajski <baggins at pld-linux.org>
>> Date:   Sat Apr 23 22:44:51 2016 +0200
>>
>>     - use 'share' not 'lib' for platform independent files
>>     - rel 3
>>
>>  python3-multilib.patch | 6 ++----
>>  python3.spec           | 2 +-
>>  2 files changed, 3 insertions(+), 5 deletions(-)
>> ---
>> diff --git a/python3.spec b/python3.spec
>> index e89ded1..694d20f 100644
>> --- a/python3.spec
>> +++ b/python3.spec
>> @@ -34,7 +34,7 @@ Summary(tr.UTF-8):    X arayüzlü, yüksek düzeyli, kabuk
>> yorumlayıcı dili
>>  Summary(uk.UTF-8):     Мова програмування дуже високого рівня з
>> X-інтерфейсом
>>  Name:          python3
>>  Version:       %{py_ver}.1
>> -Release:       2
>> +Release:       3
>>  Epoch:         1
>>  License:       PSF
>>  Group:         Development/Languages/Python
>> diff --git a/python3-multilib.patch b/python3-multilib.patch
>> index 30e0e94..f5a49b0 100644
>> --- a/python3-multilib.patch
>> +++ b/python3-multilib.patch
>> @@ -52,7 +52,7 @@ diff -dur Python-3.5.0.orig/Lib/distutils/sysconfig.py
>> Python-3.5.0/Lib/distutil
>>  +        if plat_specific:
>>  +            lib = sys.lib
>>  +        else:
>> -+            lib = 'lib'
>> ++            lib = 'share'
>>           libpython = os.path.join(prefix,
>>  -                                 "lib", "python" + get_python_version())
>>  +                                 lib, "python" + get_python_version())
>>
>
> You are probably breaking pypi and /usr/local installs again!
>
> Proper directories for RPM packages are set with setup.py options via
> %py_build/%py_install macros. Packages not using distutils/setuptools may
> need patching, but that is better than breaking Python for non-RPM usage.
>

It caused distutils.sysconfig.get_python_lib() to return /usr/lib for
platform independent modules location which is not what we want and breaks
automake's python.m4.

-- 
Jan Rękorajski | SysAdm | PLD/Linux | http://www.pld-linux.org/
baggins<at>pld-linux.org


More information about the pld-devel-en mailing list