forked from zedr/clean-code-python
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
Latest commit
26 lines (19 loc) · 582 Bytes
/
Copy pathMakefile
File metadata and controls
26 lines (19 loc) · 582 Bytes
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
.PHONY: deps clean tests
ENV=.env
PYTHON=python3
PYTHON_VERSION=$(shell ${PYTHON} -V | cut -d " " -f 2 | cut -c1-3)
SITE_PACKAGES=${ENV}/lib/python${PYTHON_VERSION}/site-packages
IN_ENV=source ${ENV}/bin/activate;
default: tests
${ENV}:
@echo "Creating Python environment...">&2
@${PYTHON} -m venv ${ENV}
@echo "Updating pip...">&2
@${IN_ENV} pip install -U pip
${SITE_PACKAGES}/pytest.py:
@${IN_ENV} pip install -r requirements.txt
deps: ${SITE_PACKAGES}/pytest.py
tests: ${ENV} ${SITE_PACKAGES}/pytest.py
@${IN_ENV} pytest
clean:
@rm -rf ${ENV} .env .pytest_cache