gatagat / lap

Linear Assignment Problem solver (LAPJV/LAPMOD).
BSD 2-Clause "Simplified" License
211 stars 66 forks source link

Add numpy and cython to setup requirements #39

Open assafmus opened 2 years ago

assafmus commented 2 years ago

I added the numpy and cython to setup.py requirements. This enables pip installing this repo without having to manually install numpy and cython beforehand.

I'm still getting this error: image

I'm not sure if this change is 100% ready but it works for me and the test pass.

lig commented 2 years ago

@gatagat what do you think about this one?

gatagat commented 2 years ago

I don't think this is solving the issue. The install_requires setting is for runtime dependencies, not setup time dependencies. So adding cython/numpy to install_requires will not ensure that it is installed when setup.py runs and these packages are needed.

There are three possibilities:

  1. Avoid requiring those packages at setup time by pre-generating and distributing the cythonized pyx file.
  2. Avoid requiring the setup itself as per PEP517/518 + e.g. flit.
  3. Publish wheels for major systems making it even simpler for users (no compiler required).