generated from bessagroup/bessa-pypi-template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
37 lines (28 loc) · 933 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
.DEFAULT_GOAL := help
PACKAGEDIR := dist
COVERAGEREPORTDIR := coverage_html_report
.PHONY: help init test test-html build upload upload-testpypi
help:
@echo "Please use \`make <target>' where <target> is one of:"
@echo " init Install the requirements.txt"
@echo " test Run the tests with pytest"
@echo " test-html Run the tests with pytest and open the HTML coverage report"
@echo " build Build the package"
@echo " upload Upload the package to the PyPi index"
@echo " upload-testpypi Upload the package to the PyPi-test index"
init:
pip install -r requirements.txt
test:
pytest
test-html:
pytest
xdg-open ./$(COVERAGEREPORTDIR)/index.html
build:
-rm -rf $(PACKAGEDIR)/*
python -m build
upload-testpypi:
$(MAKE) build
twine upload -r testpypi $(PACKAGEDIR)/* --verbose
upload:
$(MAKE) build
twine upload $(PACKAGEDIR)/* --verbose