-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
44 lines (34 loc) · 934 Bytes
/
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
.PHONY: build check-venv
# Make Python wheels
default: build
# Prepare VirtualEnv by installing project dependencies
venv/bin/activate: requirements.txt
test -d venv || python3 -m venv venv
venv/bin/pip install -r requirements.txt
touch venv/bin/activate
# Shortcut for preparation of VirtualEnv
venv: venv/bin/activate
check-venv:
ifndef VIRTUAL_ENV
$(error Please create a VirtualEnv with 'make venv' and activate it)
endif
# Build the Python wheel install packages.
build:
python ./setup.py bdist_wheel
# Update version numbers, commit and tag
bumpversion:
bumpversion patch
# Upload built packages to PyPI.
# Assumes valid credentials in ~/.pypirc
pypi-push: check-venv build
twine upload dist/moodleteacher-0.1.16-py3-none-any.whl
# Run test suite
test:
nosetests
# Clean temporary files
clean:
rm -fr build
rm -fr dist
rm -fr *egg-info
find . -name "*.bak" -delete
find . -name "__pycache__" -delete