<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>33208</bug_id>
          
          <creation_ts>2017-03-06 22:22:01 +0300</creation_ts>
          <short_desc>common filenames of .so modules are not recognized (after pip3 install)</short_desc>
          <delta_ts>2020-02-19 19:31:47 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>python3</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>33211</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Ivan Zakharyaschev">imz</reporter>
          <assigned_to name="Grigory Ustinov">grenka</assigned_to>
          <cc>george</cc>
    
    <cc>glebfm</cc>
    
    <cc>grenka</cc>
    
    <cc>imz</cc>
    
    <cc>kotopesutility</cc>
    
    <cc>vitty</cc>
    
    <cc>vseleznv</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>162309</commentid>
    <comment_count>0</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2017-03-06 22:22:01 +0300</bug_when>
    <thetext>python3-3.5.1-alt7

A difference between the commonly used (and recognized) filename for .so Python modules and the idea of ALT&apos;s python3&apos;s idea of it has been discovered (by george@) by trying to use a wheel-Python-package with .so modules:

pip3 install pygame --user
python3 -c &apos;import pygame.base&apos;

It includes a filename of a format like this: 

*.cpython-35m-x86_64-linux-gnu.so

and is not recognized and loaded by ALT&apos;s python3. However, such filenames are generated and used also in Debian and Fedora -- here is an example from Fedora 25 for i386 and x86_64:

$ rpm -qp python3-lxml-3.6.4-1.fc25.i686.rpm -l | fgrep .so
/usr/lib/python3.5/site-packages/lxml/etree.cpython-35m-i386-linux-gnu.so
/usr/lib/python3.5/site-packages/lxml/objectify.cpython-35m-i386-linux-gnu.so
$ 

/usr/lib64/python3.5/site-packages/lxml/etree.cpython-35m-x86_64-linux-gnu.so
/usr/lib64/python3.5/site-packages/lxml/objectify.cpython-35m-x86_64-linux-gnu.so

contrary to filenames generated and recognized in ALT:

$ rpm -q python3-module-lxml -l | fgrep .so
/usr/lib64/python3/site-packages/lxml/etree.cpython-35m.so
/usr/lib64/python3/site-packages/lxml/objectify.cpython-35m.so
$ 

This could be fine, if the binaries were incompatible indeed, but they are loadable and usable after renaming (george@ checked this for pygame).

(Some of ALT&apos;s patches changed this, probably, for no reason... This is a problem for using wheels installed by pip3 without recompilation.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>162310</commentid>
    <comment_count>1</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2017-03-06 22:28:32 +0300</bug_when>
    <thetext>This must be determined by the following parameter -- http://stackoverflow.com/a/38525461/94687 :

$ python3
Python 3.5.1 (default, May  5 2016, 10:50:17) 
[GCC 5.3.1 20151207 (ALT Linux 5.3.1-alt3)] on linux
Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
&gt;&gt;&gt; from distutils.sysconfig import get_config_var
&gt;&gt;&gt; get_config_var(&apos;EXT_SUFFIX&apos;)
&apos;.cpython-35m.so&apos;
&gt;&gt;&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>162319</commentid>
    <comment_count>2</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2017-03-07 15:20:27 +0300</bug_when>
    <thetext>In Sisyphus, the fix of EXT_SUFFIX Python config parameter (bringing it to the more common format) will be convenient to make together with the move to Python 3.6. (The binary modules would anyway require a rebuild.)

(As for p8, this should be decided separately. Recognizing the common suffix in addition to ours could be a solution with little hassle; otherwise, if we change this parameter for the newly built modules, we&apos;d need to track this with Provides/Requires to ensure both kinds of modules would be usable.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>162327</commentid>
    <comment_count>3</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2017-03-07 17:50:27 +0300</bug_when>
    <thetext>(In reply to comment #2)
&gt; In Sisyphus, the fix of EXT_SUFFIX Python config parameter (bringing it to the
&gt; more common format) will be convenient to make together with the move to Python
&gt; 3.6. (The binary modules would anyway require a rebuild.)

This is quite clear how to do.

&gt; (As for p8, this should be decided separately. Recognizing the common suffix in
&gt; addition to ours could be a solution with little hassle; otherwise, if we
&gt; change this parameter for the newly built modules, we&apos;d need to track this with
&gt; Provides/Requires to ensure both kinds of modules would be usable.)

This is less clear and requires hacking of a different piece of code (module finding).

Patches (and tasks for p8) are welcome!

See also: https://bugs.python.org/issue16754 which introduced the use of EXT_SUFFIX into the code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>164643</commentid>
    <comment_count>4</comment_count>
      <attachid>7140</attachid>
    <who name="Fr. Br. George">george</who>
    <bug_when>2017-07-10 23:16:39 +0300</bug_when>
    <thetext>Created attachment 7140
new triplet removal patch

This new triplet removal patch provides both two-part and five-part EXT_SUFFIX (e. g. cpython-35m and cpython-35m-i386-linux-gnu) when searching for .so module, so 3rd-party wheels can be installed and used along with ALT native packages.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>164644</commentid>
    <comment_count>5</comment_count>
    <who name="Fr. Br. George">george</who>
    <bug_when>2017-07-10 23:17:37 +0300</bug_when>
    <thetext>This new triplet removal patch provides both two-part and five-part EXT_SUFFIX (e. g. cpython-35m and cpython-35m-i386-linux-gnu) when searching for .so module, so 3rd-party wheels can be installed and used along with ALT native packages.

See also task 185232</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>188050</commentid>
    <comment_count>6</comment_count>
    <who name="Grigory Ustinov">grenka</who>
    <bug_when>2020-02-19 19:31:47 +0300</bug_when>
    <thetext>* Mon Jul 10 2017 Fr. Br. George &lt;george@altlinux.ru&gt; 3.5.1-alt9                 
- Add PLATFORM_TRIPLET suffix for binary module search</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>7140</attachid>
            <date>2017-07-10 23:16:39 +0300</date>
            <delta_ts>2017-07-10 23:16:39 +0300</delta_ts>
            <desc>new triplet removal patch</desc>
            <filename>0001-python-3.5.1-alt-disable-build-PLATFORM_TRIPLET.patch</filename>
            <type>text/plain</type>
            <size>2715</size>
            <attacher name="Fr. Br. George">george</attacher>
            
              <data encoding="base64">RnJvbSA3NzNlZGMzZmQwMDNmNDIxNGIxNzNiYmQ5NmUzOTg0ODM2ODc2ZGE4IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBZb3VyIE5hbWUgPHlvdUBleGFtcGxlLmNvbT4KRGF0ZTogTW9u
LCAxMCBKdWwgMjAxNyAxNzoyNTo0NiArMDAwMApTdWJqZWN0OiBbUEFUQ0hdIHB5dGhvbiAzLjUu
MSBhbHQgZGlzYWJsZSBidWlsZCBQTEFURk9STV9UUklQTEVUCgotLS0KIExpYi90ZXN0L3Rlc3Rf
c3lzY29uZmlnLnB5IHwgMiArLQogTWFrZWZpbGUucHJlLmluICAgICAgICAgICAgfCAyICsrCiBQ
eXRob24vZHlubG9hZF9zaGxpYi5jICAgICB8IDEgKwogY29uZmlndXJlLmFjICAgICAgICAgICAg
ICAgfCA2ICsrKystLQogNCBmaWxlcyBjaGFuZ2VkLCA4IGluc2VydGlvbnMoKyksIDMgZGVsZXRp
b25zKC0pCgpkaWZmIC0tZ2l0IGEvTGliL3Rlc3QvdGVzdF9zeXNjb25maWcucHkgYi9MaWIvdGVz
dC90ZXN0X3N5c2NvbmZpZy5weQppbmRleCAwOTE3YzNlLi5jY2JlMTMyI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