popgenmethods / smcpp

SMC++ infers population history from whole-genome sequence data.
GNU General Public License v3.0
149 stars 32 forks source link

Suggestion: numpy should not be required for setup.py #212

Open vsoch opened 2 years ago

vsoch commented 2 years ago

Hi! I noticed that you require numpy for setup.py?

https://github.com/popgenmethods/smcpp/blob/c120fcc6c230feb68bf60a97be2657616d4b965e/setup.py#L11

This makes sense since you need numpy.get_includes(), but for many users (or automated approaches) the setup.py is going to fail. I looked into options, and it looks like you can add a "pre-request" to install it first: https://luminousmen.com/post/resolve-cython-and-numpy-dependencies. E.g., something like:

from setuptools import dist
dist.Distribution().fetch_build_eggs(['numpy>=1.10'])