-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
66 lines (50 loc) · 1.2 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
lint_files=setup.py factory_djoy tests
.PHONY: install
install:
pip install -U tox -U twine
.PHONY: test
test:
tox -p auto
# --- LINT ---
# `make lint` used in tox 'lint' environment
.PHONY: lint
lint: flake8 isort dist-check
bandit -r factory_djoy
.PHONY: flake8
flake8:
flake8 $(lint_files)
.PHONY: isort
isort:
isort --check --diff $(lint_files)
.PHONY: fixlint
fixlint:
@echo "=== fixing isort ==="
isort --quiet --recursive $(lint_files)
# --- PACKAGING ---
.PHONY: dist
dist:
python setup.py sdist bdist_wheel
.PHONY: dist-check
dist-check: dist
twine check --strict dist/factory_djoy-*
.PHONY: test-upload
test-upload: dist-check
twine upload --repository-url https://test.pypi.org/legacy/ dist/factory_djoy-*
# Need to manually install dependencies since they are not on test pypi
.PHONY: test-install
test-install:
pip install Django factory-boy
pip install factory-djoy -i https://test.pypi.org/simple
.PHONY: upload
upload: dist-check
twine upload --repository-url https://upload.pypi.org/legacy/ dist/factory_djoy-*
.PHONY: requirements
requirements:
$(MAKE) -C requirements
.PHONY: clean
clean:
python setup.py clean
-rm -r build
-rm -r dist
-rm -r .tox
find . -name '*.pyc' -delete