bodono / scs-python

Python interface for SCS
MIT License
41 stars 33 forks source link

switch build-time dependency declaration to PEP 517, to build against oldest version of numpy possible for each python version to avoid ABI compatibility issues. #38

Closed naphatkrit closed 3 years ago

naphatkrit commented 3 years ago

It is best practice to build against the oldest version of Numpy a package can work with, as binaries compiled with old Numpy versions are binary compatible with newer Numpy versions, but not vice versa. Normally, this can be done by using oldest-supported-numpy (see https://pypi.org/project/oldest-supported-numpy/), but scs requires numpy version at least 1.7, so we must specify the versions manually for each python version.

This will fix issues like https://github.com/cvxpy/cvxpy/issues/1367 (cvxpy depends on scs).

Test Plan

  1. run python setup.py sdist to produce tarball.
  2. pip install cvxpy numpy==1.19.2 /code/scs-python/dist/scs-2.1.3.tar.gz.
  3. verify that cvxpy can be imported without numpy versioning issues (this failed before this change).
bodono commented 3 years ago

Great, thanks!

naphatkrit commented 3 years ago

thanks for merging! could you help do a release?

naphatkrit commented 3 years ago

actually, i forgot to do this https://github.com/bodono/scs-python/pull/39

bodono commented 3 years ago

Happy to cut a new release. Is it urgent or can it wait a day or two?

naphatkrit commented 3 years ago

Nope not urgent. Few days is fine. Thanks!!

On Tue, May 18, 2021 at 1:22 PM bodono @.***> wrote:

Happy to cut a new release. Is it urgent or can it wait a day or two?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bodono/scs-python/pull/38#issuecomment-843125008, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGR5LMXUDZX3W675SS6ROTTOJLX5ANCNFSM45BHDINQ .

naphatkrit commented 3 years ago

Bump on release. Thanks in advance!

bodono commented 3 years ago

Just uploaded 2.1.4 to pypi with the latest updates.

naphatkrit commented 3 years ago

Thanks!

On Sat, Jun 5, 2021 at 3:39 PM bodono @.***> wrote:

Just uploaded 2.1.4 to pypi with the latest updates.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bodono/scs-python/pull/38#issuecomment-855249405, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABGR5LOOHVLJTU2MHNMFF2LTRIZI7ANCNFSM45BHDINQ .