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

Error with Cython and numpy dependency #40

Open
mchalela opened this issue Mar 11, 2021 · 2 comments
Open

Error with Cython and numpy dependency #40

mchalela opened this issue Mar 11, 2021 · 2 comments

Comments

@mchalela
Copy link

Hello! I'm trying to install pmesh via pip install pmesh but I keep getting an error with cython.
It seems that you first need to have cython installed to be able to run line 46 of the setup, and also numpy to run line 3.
Is there a way to avoid using cython and numpy in the setup stage? I'm developing a package that will probably use pmesh as a dependency so numpy and cython won't be previously installed.
Thank you!!

https://github.com/rainwoodman/pmesh/blob/5c3a2263f297891923a16674029a2b01e2188f8c/setup.py#L3
https://github.com/rainwoodman/pmesh/blob/5c3a2263f297891923a16674029a2b01e2188f8c/setup.py#L46-L59

@mortele
Copy link

mortele commented Apr 9, 2021

@mchalela You can add a pyproject.toml file with [build-system] requires specifying dependencies which need to be present before setup.py is run, cf. PEP 518. Using this you can ensure numpy and cython is installed before any other dependencies, thus fixing the problem. Note that this only handles the install dependencies when using pip, running python3 setup.py install will still fail.

Alternatively, open a pull request doing exactly this in pmesh and fix the problem further upstream, so to say.

@rainwoodman
Copy link
Collaborator

A PR with a toml file is highly welcome. It sounds like we do need to tag a new release on pypi to make the file effective?

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

No branches or pull requests

3 participants