scipy / oldest-supported-numpy

Meta-package providing the oldest supported Numpy for a given Python version and platform
BSD 2-Clause "Simplified" License
55 stars 33 forks source link

Resolve conflict with pypy aarch64 #40

Closed Yikun closed 2 years ago

Yikun commented 2 years ago

The conflicting requirements fail immediately when install oldest-supported-numpy with pypy aarch64.

oldest-supported-numpy 0.14 depends on numpy==1.19.2; python_version == "3.7" and platform_machine == "aarch64"
oldest-supported-numpy 0.14 depends on numpy==1.20.0; python_version == "3.7" and platform_python_implementation == "PyPy"

We can use below cmd to make sure there are only cpython support for aarch64, but pypy not supported yet.

curl https://pypi.org/pypi/numpy/json | jq | grep filename | grep whl | grep aarch64

Results ``` "filename": "numpy-1.19.0-cp36-cp36m-manylinux2014_aarch64.whl", "filename": "numpy-1.19.0-cp37-cp37m-manylinux2014_aarch64.whl", "filename": "numpy-1.19.0-cp38-cp38-manylinux2014_aarch64.whl", "filename": "numpy-1.19.0rc1-cp36-cp36m-manylinux2014_aarch64.whl", "filename": "numpy-1.19.0rc1-cp37-cp37m-manylinux2014_aarch64.whl", "filename": "numpy-1.19.0rc1-cp38-cp38-manylinux2014_aarch64.whl", "filename": "numpy-1.19.0rc2-cp36-cp36m-manylinux2014_aarch64.whl", "filename": "numpy-1.19.0rc2-cp37-cp37m-manylinux2014_aarch64.whl", "filename": "numpy-1.19.0rc2-cp38-cp38-manylinux2014_aarch64.whl", "filename": "numpy-1.19.1-cp36-cp36m-manylinux2014_aarch64.whl", "filename": "numpy-1.19.1-cp37-cp37m-manylinux2014_aarch64.whl", "filename": "numpy-1.19.1-cp38-cp38-manylinux2014_aarch64.whl", "filename": "numpy-1.19.2-cp36-cp36m-manylinux2014_aarch64.whl", "filename": "numpy-1.19.2-cp37-cp37m-manylinux2014_aarch64.whl", "filename": "numpy-1.19.2-cp38-cp38-manylinux2014_aarch64.whl", "filename": "numpy-1.19.3-cp36-cp36m-manylinux2014_aarch64.whl", "filename": "numpy-1.19.3-cp37-cp37m-manylinux2014_aarch64.whl", "filename": "numpy-1.19.3-cp38-cp38-manylinux2014_aarch64.whl", "filename": "numpy-1.19.3-cp39-cp39-manylinux2014_aarch64.whl", "filename": "numpy-1.19.4-cp36-cp36m-manylinux2014_aarch64.whl", "filename": "numpy-1.19.4-cp37-cp37m-manylinux2014_aarch64.whl", "filename": "numpy-1.19.4-cp38-cp38-manylinux2014_aarch64.whl", "filename": "numpy-1.19.4-cp39-cp39-manylinux2014_aarch64.whl", "filename": "numpy-1.19.5-cp36-cp36m-manylinux2014_aarch64.whl", "filename": "numpy-1.19.5-cp37-cp37m-manylinux2014_aarch64.whl", "filename": "numpy-1.19.5-cp38-cp38-manylinux2014_aarch64.whl", "filename": "numpy-1.19.5-cp39-cp39-manylinux2014_aarch64.whl", "filename": "numpy-1.20.0-cp37-cp37m-manylinux2014_aarch64.whl", "filename": "numpy-1.20.0-cp38-cp38-manylinux2014_aarch64.whl", "filename": "numpy-1.20.0-cp39-cp39-manylinux2014_aarch64.whl", "filename": "numpy-1.20.0rc1-cp37-cp37m-manylinux2014_aarch64.whl", "filename": "numpy-1.20.0rc1-cp38-cp38-manylinux2014_aarch64.whl", "filename": "numpy-1.20.0rc1-cp39-cp39-manylinux2014_aarch64.whl", "filename": "numpy-1.20.0rc2-cp37-cp37m-manylinux2014_aarch64.whl", "filename": "numpy-1.20.0rc2-cp38-cp38-manylinux2014_aarch64.whl", "filename": "numpy-1.20.0rc2-cp39-cp39-manylinux2014_aarch64.whl", "filename": "numpy-1.20.1-cp37-cp37m-manylinux2014_aarch64.whl", "filename": "numpy-1.20.1-cp38-cp38-manylinux2014_aarch64.whl", "filename": "numpy-1.20.1-cp39-cp39-manylinux2014_aarch64.whl", "filename": "numpy-1.20.2-cp37-cp37m-manylinux2014_aarch64.whl", "filename": "numpy-1.20.2-cp38-cp38-manylinux2014_aarch64.whl", "filename": "numpy-1.20.2-cp39-cp39-manylinux2014_aarch64.whl", "filename": "numpy-1.20.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.20.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.20.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.0rc1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.0rc1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.0rc1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.0rc2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.0rc2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.0rc2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.22.0rc1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.22.0rc1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.22.0rc1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.22.0rc2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.22.0rc2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.22.0rc2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.22.0rc3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.22.0rc3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.22.0rc3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", "filename": "numpy-1.21.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", ```

After this patch, the aarch64 can be installed directly.

Closes: #39

Yikun commented 2 years ago

cc @rgommers

rgommers commented 2 years ago

While we're at it, let's ask @mattip what the status of PyPy on other platforms is - should we also test s390x, arm64 etc. here?

Yikun commented 2 years ago

@rgommers Thanks for suggestion, I added the test. I also do some simple test in my local repo.

mattip commented 2 years ago

Unfortunately the way this file works it needs to exclude platforms, so the lines of text will get really messy if it tries to exclude everything not supported. Perhaps making binary wheels the default in a future pip will help.

I would think that s390x, ppc64le and ppc64, while officially supported by PyPy are niche enough that we should wait for a issue before making setup.cfg totally unreadable. M1 (arm64) is not yet supported by PyPy. I expect that platform will only officially support PyPy3.9+.

~While the test for aarch64 + PyPy is helpful for off-line testing, I think CI only runs on x86_64 ubuntu-latest.~ Wrong, tests use a form of mocking.

rgommers commented 2 years ago

Thanks for adding the test @Yikun, and @mattip for the input. I agree with not making things completely unreadable - so let's merge this as is. I will do a new release later today so you can start using this @Yikun.

Yikun commented 2 years ago

@rgommers Much thanks for the help, wait for the new release!

rgommers commented 2 years ago

0.15 is uploaded to PyPI now

Yikun commented 2 years ago

@rgommers Thanks, after this