Skip to content

Commit 34a492b

Browse files
committed
Install package locally
Prior to this change, the `timezone_tools` package was not installed locally and so you had to pass a `PYTHONPATH` environment variable to pytest to run tests. This isn't a problem when running tests in `tox` and it automatically installs the first-party package as part of its set-up phase. This change updates the `makefile` to install the `timezone_tools` in editable mode. Now it's possible to run `pytest` from repo root.
1 parent 2a2c8a0 commit 34a492b

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ source venv/bin/activate
2525
You could also use [virtualenvwrapper], [direnv] or any similar tool
2626
to help manage your virtual environments.
2727

28-
### Install the Python dependencies
28+
### Install the `timezone_tools` package and its dependencies
2929

30-
To install all the development dependencies in your virtual environment,
30+
To install the `timezone_tools` package and all the development dependencies in your virtual environment,
3131
run:
3232

3333
```sh
@@ -37,8 +37,6 @@ make dev
3737
[direnv]: https://direnv.net
3838
[virtualenvwrapper]: https://virtualenvwrapper.readthedocs.io/
3939

40-
The tools used to manage this project will be installed.
41-
4240
### Run the tests
4341

4442
To start the tests with [tox](https://tox.wiki), run:
@@ -48,10 +46,10 @@ tox
4846
```
4947

5048
Alternatively, if you want to run the tests directly in your virtual environment,
51-
you many run the tests with:
49+
you may run the tests with:
5250

5351
```sh
54-
PYTHONPATH=src python3 -m pytest
52+
python3 -m pytest
5553
```
5654

5755
### Static analysis

makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ dev: install_python_packages
77

88
.PHONY:install_python_packages
99
install_python_packages: requirements.txt
10-
python3 -m pip install -r requirements.txt
10+
# Install the `timezone_tools` package in editable mode.
11+
python3 -m pip install -r requirements.txt -e .

0 commit comments

Comments
 (0)