-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
40 lines (29 loc) · 1.05 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
PIP=pip
PYTHON=python
all: help
help:
@echo "install ------------ - Install requirements."
@echo "test --------------- - Run unittests using current python."
@echo "dist --------------- - Rebuild."
@echo " clean ------------ - Clean all distribution build artifacts."
@echo " clean-pyc ------ - Remove .pyc/__pycache__ files."
@echo " clean-build ---- - Remove setup artifacts."
@echo " build ------------ - Rebuild python package."
@echo "upload ------------- - Upload built python package on pypi server."
install:
$(PIP) install -r requirements/dev.txt
$(PIP) install -r requirements/requirements.txt
$(PYTHON) -m pip install --upgrade build twine
test:
$(PYTHON) -m pytest
clean-pyc:
-find . -type f -a \( -name "*.pyc" -o -name "*$$py.class" \) | xargs rm
-find . -type d -name "__pycache__" | xargs rm -r
clean-build:
rm -rf build/ dist/ .eggs/ *.egg-info/
clean: clean-pyc clean-build
build:
$(PYTHON) -m build
dist: clean build
upload:
$(PYTHON) -m twine upload -r "${PYPISERVERNAME}" dist/*