Resolve "PyPi packaging issues"
Closes #14 (closed)
Merge request reports
Activity
My ever-so slight concern would be that without pytest in the requirements.txt file, (automated) testing will only ever be possible using a python environment which is different to the "required" environment used by most users. I suspect it's unlikely pytest or its dependencies will ever be the cause of user issues, but it could be a draw back.
In the long run, I think having a separate set of development requirements is probably a good idea, especially if they grow in the future (it could even include useful as well as necessary packages). A benefit I see is that if a user has an existing python environment administered by someone else, they can use
pyicon
without having to ask the administrator to installipdb
which they won't ever use.Ok, I found some solution that might make work nicely. In the
setup.py
, I specify:with open("requirements_documentation.txt") as f: documentation_requires = f.read().strip().split("\n") with open("requirements_development.txt") as f: development_requires = f.read().strip().split("\n") ... extras_require={ "dev": development_requires, "doc": documentation_requires, "full": development_requires+documentation_requires, },
Now, one can install like this:
pip install -e . # only base functionality, no testing and no documentation pip install -e .[dev] # with modules for testing and debuing pip install -e .[doc] # with module for compiling the documentation pip install -e .[full] # a full installation
I hope that this a good compromise.
added 1 commit
- 791fbd97 - setup.py: Allow for more installation option.
added 4 commits
-
791fbd97...971f337f - 2 commits from branch
master
- de538127 - Merge branch 'master' into 14-pypi-packaging-issues
- 15675b09 - doc: Introduce way to install also dependencies
-
791fbd97...971f337f - 2 commits from branch
mentioned in commit d477a143