forked from Unleash/unleash-client-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (37 loc) · 1.32 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
41
42
43
44
45
46
47
48
49
SHELL := /bin/bash
ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
PROJECT_NAME = UnleashClient
#-----------------------------------------------------------------------
# Rules of Rules : Grouped rules that _doathing_
#-----------------------------------------------------------------------
test: lint pytest
precommit: clean generate-requirements
build: clean build-package upload
build-local: clean build-package
#-----------------------------------------------------------------------
# Install
#-----------------------------------------------------------------------
install-clean:
pip install -U -r requirements-dev.txt && \
pip install -U -r requirements-package.txt
#-----------------------------------------------------------------------
# Testing & Linting
#-----------------------------------------------------------------------
lint:
pylint ${PROJECT_NAME} && \
mypy ${PROJECT_NAME};
pytest:
export PYTHONPATH=${ROOT_DIR}: $$PYTHONPATH && \
py.test --cov ${PROJECT_NAME} tests/unit_tests
tox-osx:
tox -c tox-osx.ini --parallel auto
#-----------------------------------------------------------------------
# Rules
#-----------------------------------------------------------------------
clean:
rm -rf build; \
rm -rf dist;
build-package:
python setup.py sdist bdist_wheel
upload:
twine upload dist/*