February 2022
Intermediate to advanced
274 pages
6h 28m
English
When developing both source and test code, it’s super handy to be able to modify the source code and immediately run the tests, without having to rebuild the package and reinstall it in our virtual environment. Installing the source code in editable mode is just the thing we need to accomplish this, and it’s a feature built in to both pip and Flit.
Let’s spin up a new virtual environment:
| | $ cd /path/to/code/ch13 |
| | $ python3 -m venv venv |
| | $ source venv/bin/activate |
| | (venv) $ pip install -U pip |
| | ... |
| | Successfully installed pip-21.3.x |
Now in our fresh virtual environment, we need to install the ./cards_proj directory as a local editable package. For this to work, we need pip version ...
Read now
Unlock full access