-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
40 lines (33 loc) · 1.17 KB
/
Makefile
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
PYV:=3.12
VEDIR=venv/${PYV}
############################################################################
#= SETUP, INSTALLATION, PACKAGING
#=> venv: make a Python 3 virtual environment
.PHONY: venv/%
venv/%:
python$* -m venv $@; \
source $@/bin/activate; \
python -m ensurepip --upgrade; \
pip install --upgrade pip setuptools
#=> develop: install package in develop mode
.PHONY: develop setup
develop setup:
pip install -e '.[dev]'
#=> devready: create venv, install prerequisites, install pkg in develop mode
.PHONY: devready
devready:
make ${VEDIR} && source ${VEDIR}/bin/activate && make develop
@echo '#################################################################################'
@echo '### Do not forget to `source ${VEDIR}/bin/activate` to use this environment ###'
@echo '#################################################################################'
############################################################################
#= TESTING
# see test configuration in pyproject.toml
#=> test: execute tests
.PHONY: test
test:
pytest tests/
#=> doctest: execute documentation tests (requires extra data)
.PHONY: doctest
doctest:
pytest tests/ --doctest-modules