Following this numpy installation question, I'd failed to install numpy with pip command on mingw64 windows 10. While building my project with bazel, I've dependency on numpy, so other alternative approach I'd followed is to install numpy via pacman package.
I created a numpy-test.py to check if this works, and it ran successfully.
While building my project bazel tries to build wheel and install numpy again, probably using the pip way and I know this fails:
ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
How to specify Bazel to not build numpy again and use pacman installed numpy. BUILD file :
py_wheel(
name = "my_wheel",
distribution = "my",
python_tag = "py3",
version = "0.0.1",
deps = [
":my_pkg",
],
requires = [
"appdirs",
"importlib_resources",
"matplotlib",
"numpy",
"psutil",
"PyGObject",
"pyyaml",
"more_itertools",
"termcolor",
],
entry_points = {
'gui_scripts': [
'my-gui = my.main:main',
],
'console_scripts': [
'my_parser = example.my_parser:console_entry',
],
}
)
Installed python and pip details :
pip version 23.1.2 from C:/msys64/mingw64/lib/python3.10/site-packages/pip (python 3.10)
Python 3.10.11 [GCC 12.2.0 64 bit (AMD64)] on win32
requirements.txt file used in pip_deps contain:
importlib-resources==5.8.0
matplotlib
numpy==1.23.1
platformdirs==2.5.2
psutil==5.9.1
pycairo==1.21.0
PyGObject==3.44.1
pyparsing==3.0.9
pytest==7.1.2
pytest-qt
PyYAML==6.0
appdirs
pytest-xvfb
termcolor
more-itertools
and also how to know what python and pip is used by Bazel during this BUILD process?