forked from fuhrysteve/marshmallow-jsonschema
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (35 loc) · 980 Bytes
/
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
41
42
43
44
45
46
47
48
49
50
51
PROJECT = marshmallow_jsonschema
PYTHON_VERSION ?= 3.8
VIRTUAL_ENV ?= .venv
PYTHON ?= $(VIRTUAL_ENV)/bin/python
REQUIREMENTS = requirements.txt
REQUIREMENTS_TEST = requirements-test.txt
REQUIREMENTS_TOX = requirements-tox.txt
SHELL := /bin/bash -euo pipefail
venv_init:
pip install virtualenv
if [ ! -d $(VIRTUAL_ENV) ]; then \
virtualenv -p python$(PYTHON_VERSION) --prompt="($(PROJECT))" $(VIRTUAL_ENV); \
fi
venv: venv_init
$(VIRTUAL_ENV)/bin/pip install -r $(REQUIREMENTS)
$(VIRTUAL_ENV)/bin/pip install -r $(REQUIREMENTS_TEST)
$(VIRTUAL_ENV)/bin/pip install -r $(REQUIREMENTS_TOX)
tox:
tox
test:
pytest
test_coverage:
pytest --cov-report html --cov-config .coveragerc --cov $(PROJECT)
install_pandoc:
sudo apt install pandoc
pip install pypandoc
pypitest:
python setup.py sdist upload -r pypitest
pypi:
python setup.py sdist upload -r pypi
clean_venv:
rm -rf $(VIRTUAL_ENV)
clean_pyc:
find . -name \*.pyc -delete
clean: clean_venv clean_pyc