diff options
author | Calum Lind <calumlind@gmail.com> | 2018-04-25 14:23:05 +0100 |
---|---|---|
committer | Calum Lind <calumlind@gmail.com> | 2018-06-01 23:41:17 +0100 |
commit | bae1647e99e68244607e50633ca67a8c5b16ebfb (patch) | |
tree | 28f3f2e0ce93ec2d1fdf1acd60151225908abab8 /docs | |
parent | decd7aca7130f0eca674ddd5ce95a00d08f4c475 (diff) | |
download | deluge-bae1647e99e68244607e50633ca67a8c5b16ebfb.tar.gz deluge-bae1647e99e68244607e50633ca67a8c5b16ebfb.tar.bz2 deluge-bae1647e99e68244607e50633ca67a8c5b16ebfb.zip |
Add Pipenv Pipfile for development
Switching to Pipenv will speed up developement. See the docs for
details on using Pipenv.
- Added more flake8 checks.
- Added `detox` for running tests in parallel locally.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/source/pipenv.md | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/docs/source/pipenv.md b/docs/source/pipenv.md new file mode 100644 index 000000000..bfd5e21e2 --- /dev/null +++ b/docs/source/pipenv.md @@ -0,0 +1,63 @@ +# Using pipenv + +For a quick summary read: https://docs.pipenv.org/basics/ + +## Prerequisites + + * python-libtorrent + * pip + * pipenv + +## Install pipenv and packages + +Install Pipenv and upgrade pip: + pip install -U pip pipenv + +On Ubuntu: + sudo -H pip install -U pip pipenv + +In order to have access to system libtorrent we use `--site-packages` and +enable `PIP_IGNORE_INSTALLED`. Hopefully libtorrent will be available as a +pypi package at somepoint. + +See: https://docs.pipenv.org/advanced/#working-with-platform-provided-python-components + +Note you can `export PIP_IGNORE_INSTALLED=1` to save prefixing each time. It +has been included in commands below to denote requirement. + +### Users + + PIP_IGNORE_INSTALLED=1 pipenv --site-packages install + +### Developers + + PIP_IGNORE_INSTALLED=1 pipenv --site-packages install --dev + +### Test libtorrent installed + + pipenv run python -c 'import libtorrent as lt; print(lt.version)' + +### Bash shell completion + +To enable Pipenv shell completion for commands: + + eval "$(pipenv --completion)" + +## Running commands + +You can either enter the Pipenv virtualenv shell: + + pipenv shell --fancy + ./setup.py build + +Note: To check whether you are in a venv use `which python`. + +or prefix commands with the `pipenv run` option: + + pipenv run ./setup.py build + +## Developing Deluge + +This is the equivalent to `setup.py develop` but uses the pipenv environment: + + pipenv install --dev -e . |