-
Notifications
You must be signed in to change notification settings - Fork 22
/
Makefile
68 lines (48 loc) · 1.43 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
# ------
# Common
# ------
$(eval venvpath := .venv)
$(eval pip := $(venvpath)/bin/pip)
$(eval python := $(venvpath)/bin/python)
$(eval bumpversion := $(venvpath)/bin/bumpversion)
$(eval twine := $(venvpath)/bin/twine)
$(eval sphinx := $(venvpath)/bin/sphinx-build)
$(eval nose2 := $(venvpath)/bin/nose2)
setup-virtualenv:
@test -e $(python) || python3 -m venv $(venvpath)
# -------
# Release
# -------
setup-release: setup-virtualenv
$(pip) install --requirement requirements-release.txt
bumpversion:
$(bumpversion) $(bump)
push:
git push && git push --tags
sdist:
$(python) setup.py sdist
upload:
$(twine) upload --skip-existing dist/*.tar.gz
# make release bump=minor (major,minor,patch)
release: setup-release bumpversion push sdist upload
# -------------
# Documentation
# -------------
setup-docs: setup-virtualenv
$(pip) install --requirement requirements-docs.txt
docs-html: setup-docs
touch docs/index.rst
export SPHINXBUILD="`pwd`/$(sphinx)"; cd docs; make html
# -------
# Project
# -------
test: setup-virtualenv
$(pip) install --editable=.[test]
$(python) setup.py test
mkvar:
mkdir -p var/lib
redis-start: mkvar
echo 'dir ./var/lib' | redis-server -
celery-start: mkvar
@# http://docs.celeryproject.org/en/latest/userguide/periodic-tasks.html#starting-the-scheduler
celery worker --app uspto.celery.tasks --beat --schedule-filename var/lib/celerybeat-schedule --loglevel=info