esheldon / pymangle

Simple code to read mangle masks, calculate ids and weights, and generate random points

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add numpy to setup_requires

albireox opened this issue · comments

Could you add numpy to setup_requires and wrap the extension build inside a custom build_ext class? Right now pymangle can only be installed if numpy is already installed. This breaks many workflows and makes installing tools that depend on pymangle in CI environments quite complicated.

The setup_requires sounds fine, can you please submit a PR?

I don't understand why we would need a custom build_ext though

I think there’s a relevant PR sitting here for years?

I think it's needed because right now numpy is imported in setup.py at the very top. I think that will cause problems if numpy is not installed even if it is in setup_requires.

There is a PR open that at least superficially does what I was proposing. I'm happy to take over it an make sure it works if that helps.

That would be very much appreciate, thank you.

I've added PR #23 which is almost identical to #5 (so all the credit goes to @montefra). I've merged master, updated the workflow, and tested that it works correctly.