1+ # Development setup
2+
3+ ## Create a virtual environment with the test dependencies
4+
5+ ``` bash
6+ python -m venv .venv
7+ . .venv/bin/activate
8+ pip install pip-tools==7.3.0
9+ pip-compile --extra=test,mypy,pyright,pytype,tox -o - pyproject.toml | pip install -r /dev/stdin
10+ ```
11+
112## Development setup on Fedora 37
213
314On Fedora 37, the ` tox ` rpm installs all Python versions.
@@ -6,9 +17,26 @@ But this `tox` is older, so install `tox==4.5.1` using `pip` (see below)
617``` bash
718sudo dnf install tox; sudo rpm -e tox
819```
20+ But preferably use ` tox ` from the virtual environment instead.
21+
22+ ## Development setup on Ubuntu 24.04
23+
24+ Prefer the virtual environment. Alternatively, an option is to use ` pipx ` :
25+
26+ ``` bash
27+ sudo apt install pipx
28+ pipx install tox; pipx install ' pytest<7' ; pipx install pylint
29+ pipx inject pytest pytest-{forked,localftpserver,pythonpath,subprocess,timeout} pyfakefs pytest_httpserver six mock
30+ pipx inject pylint pyfakefs six mock pytest{,_forked,-localftpserver}
31+ ```
32+
33+ Use the ` deadsnakes ` ppa to install Python versions like 3.8 and 3.11 (see below)
934
1035## Development setup on Ubuntu 22.04
1136
37+ Usage of < https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa > to install
38+ other python versions.
39+
1240``` bash
1341sudo apt update
1442sudo apt install software-properties-common python{2,3}-dev
@@ -77,7 +105,7 @@ Using pip-tools, you can extract the requirements and extras from `pyptoject.tom
77105
78106``` bash
79107PYTHON=python3.10
80- EXTRAS=.,test,mypy,pytype,tox
108+ EXTRAS=.,test,mypy,pyright, pytype,tox
81109PFLAGS=" --no-warn-conflicts"
82110$PYTHON -m pip install pip-tools==7.3.0
83111$PYTHON -m piptools compile --extra=$EXTRAS -o - pyproject.toml |
0 commit comments