This repository has been archived by the owner on Jan 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
68 lines (58 loc) · 1.61 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
67
68
distribution = django-local-settings
egg_name = django_local_settings
egg_info = $(egg_name).egg-info
package = local_settings
sdist = dist/$(distribution)-$(version).tar.gz
upload_path = hrimfaxi:/vol/www/cdn/pypi/dist
venv = .env
python_version ?= python3
version = $(shell cat VERSION)
sources = $(shell find . \
-not -path '.' \
-not -path '*/\.*' \
-not -path './build' -not -path './build/*' \
-not -path './dist' -not -path './dist/*' \
-not -path './*\.egg-info' -not -path './*\.egg-info/*' \
-not -path '*/__pycache__*' \
)
init: install test
reinit: clean-venv clean-install init
venv: $(venv)
$(venv):
virtualenv -p $(python_version) $(venv)
clean-venv:
rm -rf $(venv)
install: venv $(egg_info)
reinstall: clean-install install
$(egg_info):
$(venv)/bin/pip install -e .[dev]
clean-install:
rm -rf $(egg_info)
test: install
$(venv)/bin/python -m unittest discover
coverage:
$(venv)/bin/coverage run --source $(package) -m unittest discover && coverage report
tox: install
$(venv)/bin/tox
tox-clean:
rm -rf .tox
retox: tox-clean tox
sdist: $(sdist)
$(sdist): $(sources)
python setup.py sdist
clean-sdist:
rm -f $(sdist)
upload: sdist
scp $(sdist) $(upload_path)
upload-to-pypi:
python setup.py sdist upload
clean: clean-pyc
clean-all: clean-install clean-pyc clean-sdist clean-venv
rm -rf build dist
clean-pyc:
find . -name __pycache__ -type d -print0 | xargs -0 rm -r
find . -name '*.py?' -type f -print0 | xargs -0 rm
.PHONY = \
init reinit venv install reinstall test coverage sdist upload upload-to-pypi \
clean-venv clean-install clean-sdist \
clean clean-all clean-pyc