Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requirements not automatically installed #19

Closed
bjuergens opened this issue Dec 11, 2019 · 1 comment · Fixed by #20
Closed

requirements not automatically installed #19

bjuergens opened this issue Dec 11, 2019 · 1 comment · Fixed by #20

Comments

@bjuergens
Copy link
Contributor

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
Copy link
Contributor

Thanks---looking forward to the PR.

bjuergens pushed a commit to bjuergens/csa that referenced this issue Dec 11, 2019
mdjurfeldt pushed a commit that referenced this issue Dec 16, 2019
* properly declare install_requires, so requirments get installed automatically when installed with pip

* fixed #19. Don't import the module itself in setup.py, because that breaks pip's install process

* formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants