blob: bfd5e21e2f8ac39937e39c7d1a6f43163a798e33 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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 .
|