INCF / csa

The Python implementation of the Connection-Set Algebra
GNU General Public License v3.0
13 stars 17 forks source link

requirements not automatically installed #19

Closed bjuergens closed 4 years ago

bjuergens commented 4 years ago

problem

When installing csa with pip, then the dependencies matplotlib and nump must be installed manually beforehand.

Due to this problem, this package (and also all packages depending on it) can't be simply installed via requirements.txt (Example of downstream issue). This problem gets more significant if you use this package in build-pipelines where introducing extra steps always comes along with an increase in complexity.

causes

  1. install_requires is not declared in setup.py
  2. setup.py imports csa to read the version number, which in turn imports everything else, including matplotlib and numpy

suggested fix:

  1. rename "requires" to "install_requires" in setup.py
  2. hardcode version number in setup.py
  3. remove version.py, since this is now unused

(I will open a PR for this)

reproduction

docker run -it ubuntu:18.04 bash
export MPLBACKEND=agg
apt-get update && apt-get install -y python-pip
pip install csa

actual behavior: The last line fails with ImportError: No module named numpy

expected behavior: No errors, because numpy and matplotlib get installed automatically

mdjurfeldt commented 4 years ago

Thanks---looking forward to the PR.