Offline (non-Internet-connected) systems may experience failures on installing Python packages. The package authors may not have CI setup for an offline test case, so they don’t realize it’s an issue. In general, Python packages can use pyproject.toml more effectively in a Python-standard way to overcome these issues.
Instead of telling users to manually install a package such as Numpy, use pyproject.toml instead of setuptools setup_requires. Setuptools assumes the computer will be internet-connected and even if the package is already installed the install will fail on an offline system.
To ensure a package like Numpy is installed first, for example where
f2py is used,
pyproject.toml file including:
[build-system] requires = ["setuptools", "wheel", "numpy"]
This will auto-install the prereqs before the install begins.
When including this pyproject.toml parameter, do not omit “setuptools”, “wheel” or the package may fail to install. PEP517 assumes unless told otherwise:
[build-system] requires = ["setuptools", "wheel"]
such as by omitting them in a pyproject.toml file.