-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (31 loc) · 1.18 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
.PHONY: develop docs
PYTHON ?= python3
IN_VENV=. ./venv/bin/activate
PROJECT=spectre
SYSTEM_TEST_SCRIPT=tests/system_tests.sh
venv/bin/activate:
test -d venv || $(PYTHON) -m venv venv
${IN_VENV} && pip install pip --upgrade
${IN_VENV} && pip install -r requirements.txt
develop: venv/bin/activate
${IN_VENV} && python setup.py develop
test: venv/bin/activate
# we typically have more flake8 extensions here, but the project is in such a state...
${IN_VENV} && pip install pytest pytest-cov
${IN_VENV} && pytest tests --cov spectre \
--cov-report html --cov-report term --cov-report term-missing
system_test: venv/bin/activate
${IN_VENV} && pip install bgzip truvari
${IN_VENV} && pip install .
${IN_VENV} && bash ${SYSTEM_TEST_SCRIPT}
IN_BUILD=. ./pypi_build/bin/activate
pypi_build/bin/activate:
test -d pypi_build || $(PYTHON) -m venv pypi_build --prompt "(pypi) "
${IN_BUILD} && pip install pip --upgrade
${IN_BUILD} && pip install --upgrade pip setuptools twine wheel readme_renderer[md] keyrings.alt
.PHONY: sdist
sdist: pypi_build/bin/activate
${IN_BUILD} && python setup.py sdist
.PHONY: clean
clean:
rm -rf __pycache__ dist build venv ${PROJECT}.egg-info tmp docs/_build