astrofrog / fast-histogram

:zap: Fast 1D and 2D histogram functions in Python :zap:
BSD 2-Clause "Simplified" License
267 stars 28 forks source link

setup.py requires numpy #13

Closed albireox closed 6 years ago

albireox commented 7 years ago

The current version of setup.py imports numpy to get its include path. I'm finding this to be a problem when you add fast-histogram as a dependency in your requirements.txt. Even if you also add numpy as a requirement, there is no way to enforce that numpy will have been installed by the time the setup.py in fast-histogram gets run.

astrofrog commented 7 years ago

This is a general problem not specific to fast-histogram (see e.g. https://stackoverflow.com/questions/27021270/how-to-handle-dependency-on-scipy-in-setup-py or https://stackoverflow.com/questions/21605927/why-doesnt-setup-requires-work-properly-for-numpy). But I do have some ideas on adjusting the setup.py to prevent this kind of issue, so I'll look into it.

astrofrog commented 6 years ago

I fixed this in https://github.com/astrofrog/fast-histogram/pull/15