esutil
esutil copied to clipboard
A bit hacky way of forcing numpy to be installed
prior to main body of setup.py so that it may use numpy.get_include()
It seems there is no "official" way to do it - see e.g. https://stackoverflow.com/questions/54117786/add-numpy-get-include-argument-to-setuptools-without-preinstalled-numpy (the solution is borrowed from that thread)
I think the correct way to have numpy
available at install time is to include a pyproject.toml
file with
[build-system]
requires = ["setuptools","wheel","numpy"]
and then you can just keep using the current setup.py
(I think, haven't tested this specific case). I think you then have to install with pip
(e.g., pip install -e .
for an editable install), but I'm not sure.
Exactly - it will not work with python setup.py install
installation method anymore, which is a bit counter-intuitive I think.
Exactly - it will not work with
python setup.py install
installation method anymore, which is a bit counter-intuitive I think.
Perhaps counter-intuitive, but you're not supposed to use python setup.py install
anymore, setuptools
' own page doesn't even mention python setup.py install
anymore. One is not supposed to even assume that setuptools
is installed on a system, so technically packages without a pyproject.toml
can't be installed reliably on all systems.
This was superseded by #77, so this could be closed.