loongson/pypi/: oldest-supported-numpy-2022.5.28 metadata and description

Homepage Simple index

Meta-package that provides the oldest NumPy that supports a given Python version and platform. If wheels for the platform became available on PyPI only for a more recent NumPy version, then that NumPy version is specified.

author Thomas Robitaille
author_email thomas.robitaille@gmail.com
license BSD
requires_dist
  • numpy (==1.21.6) ; python_version == "3.10" and platform_python_implementation != "PyPy"
  • numpy (==1.13.3) ; python_version == "3.5" and platform_machine != "aarch64" and platform_system != "AIX"
  • numpy (==1.18.5) ; python_version == "3.5" and platform_machine == "aarch64" and platform_python_implementation != "PyPy"
  • numpy (==1.16.0) ; python_version == "3.5" and platform_system == "AIX"
  • numpy (==1.13.3) ; python_version == "3.6" and platform_machine != "aarch64" and platform_system != "AIX" and platform_python_implementation != "PyPy"
  • numpy (==1.19.2) ; python_version == "3.6" and platform_machine == "aarch64" and platform_python_implementation != "PyPy"
  • numpy (==1.19.0) ; python_version == "3.6" and platform_python_implementation == "PyPy"
  • numpy (==1.16.0) ; python_version == "3.6" and platform_system == "AIX"
  • numpy (==1.14.5) ; python_version == "3.7" and (platform_machine != "arm64" or platform_system != "Darwin") and platform_machine != "aarch64" and platform_system != "AIX" and platform_python_implementation != "PyPy"
  • numpy (==1.19.2) ; python_version == "3.7" and platform_machine == "aarch64" and platform_python_implementation != "PyPy"
  • numpy (==1.21.0) ; python_version == "3.7" and platform_machine == "arm64" and platform_system == "Darwin"
  • numpy (==1.20.0) ; python_version == "3.7" and platform_python_implementation == "PyPy"
  • numpy (==1.16.0) ; python_version == "3.7" and platform_system == "AIX"
  • numpy (==1.17.3) ; python_version == "3.8" and (platform_machine != "arm64" or platform_system != "Darwin") and platform_machine != "aarch64" and platform_machine != "s390x" and platform_python_implementation != "PyPy"
  • numpy (==1.19.2) ; python_version == "3.8" and platform_machine == "aarch64" and platform_python_implementation != "PyPy"
  • numpy (==1.21.0) ; python_version == "3.8" and platform_machine == "arm64" and platform_system == "Darwin"
  • numpy (==1.17.5) ; python_version == "3.8" and platform_machine == "s390x" and platform_python_implementation != "PyPy"
  • numpy (==1.22.2) ; python_version == "3.8" and platform_python_implementation == "PyPy"
  • numpy (==1.19.3) ; python_version == "3.9" and (platform_machine != "arm64" or platform_system != "Darwin") and platform_python_implementation != "PyPy"
  • numpy (==1.21.0) ; python_version == "3.9" and platform_machine == "arm64" and platform_system == "Darwin"
  • numpy ; python_version >= "3.11"
  • numpy ; python_version >= "3.9" and platform_python_implementation == "PyPy"
requires_python >=3.5

Because this project isn't in the mirror_whitelist, no releases from root/pypi are included.

File Tox results History
oldest-supported-numpy-2022.5.28.tar.gz
Size
3 KB
Type
Source
  • Replaced 1 time(s)
  • Uploaded to loongson/pypi by loongson 2022-06-09 00:27:17
oldest_supported_numpy-2022.5.28-py3-none-any.whl
Size
4 KB
Type
Python Wheel
Python
3
  • Replaced 1 time(s)
  • Uploaded to loongson/pypi by loongson 2022-06-09 00:27:17
PyPI

About

This is a meta-package which can be used in pyproject.toml files to automatically provide as a build-time dependency the oldest version of Numpy that supports the given Python version and platform. In case of platforms for which Numpy has prebuilt wheels, the provided version also has a prebuilt Numpy wheel.

The reason to use the oldest available Numpy version as a build-time dependency is because of ABI compatibility. Binaries compiled with old Numpy versions are binary compatible with newer Numpy versions, but not vice versa. This meta-package exists to make dealing with this more convenient, without having to duplicate the same list manually in all packages requiring it.

In other words:

[build-system]
requires = [
    "wheel",
    "setuptools",
    "numpy==1.13.3; python_version=='3.5'",
    "numpy==1.13.3; python_version=='3.6'",
    "numpy==1.14.5; python_version=='3.7'",
    # more numpy requirements...
]

can be replaced by:

[build-system]
requires = ["wheel", "setuptools", "oldest-supported-numpy"]

And as new Python versions are released, the pyproject.toml file does not need to be updated.

Q&A

Why define the Numpy pinnings using install_requires in this repository?

The Numpy version pinnings are defined inside the setup.cfg file as install_requires dependencies, rather than as build-time dependencies inside pyproject.toml. This is deliberate, since Numpy is not actually required to build wheels of oldest-supported-numpy. What we need here is to make sure that when oldest-supported-numpy is installed into the build environment of a package using it, Numpy gets installed too as a runtime dependency inside the build environment.

Another way to think about this is that since we only publish (universal) wheels of oldest-supported-numpy, the wheel contains no pyproject.toml, setup.cfg, or setup.py code - it only contains metadata including dependencies which get installed by pip when oldest-supported-numpy is installed.

Can I use this if my package requires a recent version of Numpy?

In many cases, even though your package may require a version of Numpy that is more recent than the pinned versions here, this is often a runtime requirement, i.e. for running (rather than building) your package. In many cases, unless you use recent features of the Numpy C API, you will still be able to build your package with an older version of Numpy and therefore you will still be able to use oldest-supported-numpy. You can still impose a more recent Numpy requirement in install_requires

What about having a catchier name for this package?

The current name is not very catchy as package names go, but it is very descriptive. This package is only meant to be used in pyproject.toml files for defining build-time dependencies, so it’s more important to have a descriptive than a catchy name!

What if I think that one of the pinnings is wrong or out of date?

Please feel free to open an issue or a pull request if you think something is wrong or could be improved!