Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A bit hacky way of forcing numpy to be installed #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

karpov-sv
Copy link
Contributor

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)

…f setup.py so that it may use numpy.get_include()
@jobovy
Copy link
Contributor

jobovy commented Jun 3, 2022

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.

@karpov-sv
Copy link
Contributor Author

Exactly - it will not work with python setup.py install installation method anymore, which is a bit counter-intuitive I think.

@jobovy
Copy link
Contributor

jobovy commented Jun 3, 2022

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.

@jobovy
Copy link
Contributor

jobovy commented Aug 23, 2023

This was superseded by #77, so this could be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants