0

I have a Cython-based package which depends on other C++ SO libraries. Those libraries are binary different between Ubuntu (dev) and RedHat (prod). So the SO file generated by Cython has to be different as well. If I use Wheel to package it the file name is same for both environments:

package-version-cp27-cp27mu-linux_x86_64.whl

So if I upload it to pypi it will conflict with RedHat based distribution of the same package. I have to upload it to pypi because the project is then PEX-ed (via Pants) and PEX tries to download from pypi and fails if it does not find it with the following exception.

Exception caught: 'pex.resolver.Unsatisfiable'

Any ideas how to resolve it? Thx.

Inquisitor
  • 71
  • 1
  • 1
  • 3
  • 1
    I think the only way to handle this is to statically include the C++ libraries into the wheel. Is it not possible to build your wheel on the manylinux docker image? There is supposed to be tooling that automates the job of statically including libraries that aren't part of the base manylinux install. – ngoldbaum Apr 27 '18 at 15:40
  • Possible duplicate of [distribution : how to build a compiled module for multiple python version and platform](https://stackoverflow.com/questions/49279328/distribution-how-to-build-a-compiled-module-for-multiple-python-version-and-pl) – danny Apr 27 '18 at 15:57
  • Only multi-platform binary wheels are allowed on PyPi, which means building `manylinux1` and above wheels. See above link for details. – danny Apr 27 '18 at 15:58

1 Answers1

0

I found a solution by using a different PyPi instance. So our DEV Ubuntu environment and PROD RedHat just use two different PyPi sources.

To do that I had to make two configurations ~/.pypic and ~/.pip/pip.conf to upload.

Inquisitor
  • 71
  • 1
  • 1
  • 3