Adam Cecile created MESOS-7732:
----------------------------------

             Summary: WHL filename guessing does not work with recent python 
wheel versions
                 Key: MESOS-7732
                 URL: https://issues.apache.org/jira/browse/MESOS-7732
             Project: Mesos
          Issue Type: Bug
          Components: build
    Affects Versions: 1.3.0, 1.2.1, 1.2.0
            Reporter: Adam Cecile


Hi,

The way you guess generated WHL filename relies on a Python wheel bug.
Despites the code contains ABI dependent code (the way Python has been built), 
the generated WHL have "-none-" as ABI restriction.
The only way to make it sure to detect the generated filename (proper or buggy 
ones, depending on wheel version) is to mimic wheel behavior.

Old version:

{noformat}
acecile@HI-LIN-3RPRRY1:~$ dpkg -l | grep python-wheel | awk '{ print $3 }'
0.24.0-1
acecile@HI-LIN-3RPRRY1:~$ python -c 'from wheel import pep425tags; print("-" + 
"-".join(pep425tags.get_supported()[0]))'
-cp27-none-linux_x86_64
acecile@HI-LIN-3RPRRY1:~$
{noformat}

New versions:
{noformat}
[email protected]:~$ dpkg -l | grep python-wheel | awk '{ print $3 }'
0.29.0-2
[email protected]:~$ python -c 'from wheel import pep425tags; 
print("-" + "-".join(pep425tags.get_supported()[0]))'
-cp27-cp27mu-linux_x86_64
[email protected]:~$
{noformat}

The patch below allows me to built Mesos with different external wheel version.
Be careful, I'm not sure how it behaves when building with bundled Python 
wheel... It has to be checked...

{noformat}
Description: Use pep425tags to compute arch dependent WHL filenames
 ABI may not be none depending on the Python version.
 .
 pep425tags.py extracted from pip master branch, because the one included
 in provided pip may not contain everything.
 .
 glibc stuff has been commented because I don't need manylinux support
 and it depends on newer pip.
 .
 mesos (1.2.0-2) unstable; urgency=medium
 .
   * Add lsb-release build dependency.
   * Use LSB to generate unique binary packages version and pass it to
     dh_gencontrol (fix repo mirroring with files pooling systems).
   * Add Fix_build_with_GCC_6 patch to fix FTBFS on Stretch.
   * Build with bundled because Stretch libboost-dev is way too recent.
   * Build with CPPFLAGS += -Wno-deprecated-declarations otherwise
     bundled libboost FTBFS.
   * Remove python-protbuf (<< 3) dependency, it seems to work fine
     (patch).
   * Remove unecessary Python google-common>=0.0.1 (patch).
   * Add missing dh-python b-dep.
Author: Adam Cécile <[email protected]>

---
Origin: other
Bug: TODO FIXME
Forwarded: yes
Last-Update: 2017-06-21

Index: mesos-1.2.0/configure.ac
===================================================================
--- mesos-1.2.0.orig/configure.ac
+++ mesos-1.2.0/configure.ac
@@ -2091,10 +2091,8 @@ There are two possible workarounds for t
      print "-py" + sys.version[[0:3]]'`

   PYTHON_WHL_POSTFIX=`$PYTHON -c \
-    'import sys; \
-     from distutils.util import get_platform; \
-     print "-cp" + sys.version[[0:3]].replace(".", "") + "-none-" \
-       + get_platform().replace(".", "_").replace("-", "_")'`
+    'from wheel import pep425tags; \
+     print("-" + "-".join(pep425tags.get_supported()[[0]]))'`

   PYTHON_WHL_PUREPY_POSTFIX=`$PYTHON -c \
     'import sys; \
{noformat}

Best regards, Adam.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to