[build-system]
requires = ["wheel", "setuptools>=18.0", "cython>=0.29.0", "numpy>=1.20"]
I package via python setup.py sdist bdist_wheel, then twine upload --repository testpypi dist/*, and
pip install -i https://test.pypi.org/simple/ mypkg==0.1.0
into a fresh virtual Anaconda environment, which starts installing numpy-1.9.3 that's clearly below 1.20, and yields
File "c:\python38\lib\site-packages\setuptools\msvc.py", line 328, in msvc14_gen_lib_options
if LegacyVersion(np.__version__) < LegacyVersion('1.11.2'):
AttributeError: module 'numpy' has no attribute '__version__'
----------------------------------------
ERROR: Command errored out with exit status 1:
My setup.py doesn't have setup_requires, but does have include_dirs=[numpy.get_include()], and ext_modules=Cython.Build.cythonize(setuptools.Extension(...)). Windows 10.
Why is the requirement being ignored, and how to fix?