Skip to content

[0.7.0] Provide wheels for Python 3.9+ #344

@davidghiurco

Description

@davidghiurco

Describe the bug

Python 3.9.x+ users are unable to install POT==0.7.0 from a wheel because https://pypi.org/project/POT/0.7.0/#files only has wheels built for Python 3.5, 3.6, 3.7, and 3.8.

Thus we have to rely on a source distribution installation.

This, in combination with the fact that version 0.7.0 doesn't have a pyproject.toml (which was added in the 0.8.0 release, see: #293) makes source builds extremely annoying on newer versions of Python.
Because of the missing pyproject.toml, I have to have a pip install numpy cython in like 8 different places throughout my build scripts if I want to upgrade my Python version to 3.9.x. Not only is this bad practice, but it also introduces sensibilities related to numpy binary compatibility (at least in my case).

Naturally, upgrading to POT==0.8.0 would solve this problem, but the upgrade introduces changes in mathematical algorithms which (at least for several of my projects) break sensible models. Thus we are stuck with POT==0.7.0.

To Reproduce

Steps to reproduce the behavior:

  1. Install Python >= 3.9.0
  2. Run pip install POT==0.7.0

Screenshots

Code sample

Expected behavior

pip install POT==0.7.0 should work on Python 3.9.x+ without extra commands being necessary apriori.

Environment (please complete the following information):

  • OS (e.g. MacOS, Windows, Linux): MacOS Montery, version 12.1
  • Python version: 3.9.7
  • How was POT installed (source, pip, conda): pip
  • Build command you used (if compiling from source): pip install POT==0.7.0

Output of the following code snippet:

>>> import platform; print(platform.platform())
macOS-10.16-x86_64-i386-64bit
>>> import sys; print("Python", sys.version)
Python 3.9.7 (default, Sep 16 2021, 08:50:36) 
[Clang 10.0.0 ]
>>> import numpy; print("NumPy", numpy.__version__)
NumPy 1.21.4
>>> import scipy; print("SciPy", scipy.__version__)
SciPy 1.7.3
>>> import ot; print("POT", ot.__version__)
POT 0.7.0

Additional context

This problem can be solved in one of 2 ways (or both):

  1. Upload POT==0.7.0 wheels for Python 3.9+ to PyPI

  2. Backport [WIP] POT build without installing cython first #293 to 0.7.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions