- pip version: 20.0.2
- Python version: 3.8.2
- Numpy verssion: 1.18.1
- OS: Microsoft Windows 10
Pip fails to build and install Numpy-1.18.0 when built with debug global option
We have been using Numpy debug modules built and installed in using pip.
python_d.exe -m pip install --no-binary :all: --global-option build --global-option --debug numpy
The builds for versions starting from Numpy-1.18.0 release are failing. The reason for this failure is the introduction of pyproject.toml in this version of Numpy. It contains the following lines:
[build-system] requires = [ "setuptools", "wheel", "Cython>=0.29.14", # Note: keep in sync with tools/cythonize.py ]
The Python environment already have “setuptools”, “wheel” and “Cython” packages built with appropriate options and installed correctly using pip. But, the command
python_d.exe -m pip install --no-binary :all: --global-option build --global-option --debug numpy making pip to download and build them again instead of using the existing packages. Is this correct behavior? Any clarifications would be greatly appreciated.
The global options (build --debug) that are specified for building numpy are not being passed on to the Cython building process. This is causing the creation of numpy debug libraries and Cython release libraries leading to a mix up and failure of numpy build process.
My second question is, is there a way to pass the global options to the dependency build process. I am not sure if this is bug in numpy code, if this can be fixed by altering the numpy’s pyproject.toml file.
- Python 3.8.2
- Pip 20.0.2
- Numpy 1.18.1
- Microsoft Windows 10