-
Notifications
You must be signed in to change notification settings - Fork 83
/
Makefile
48 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
SHELL := /bin/bash
# directory to hold virtualenv
VENV_DIR?=${PWD}/.venv
VENV_ACTIVATE=$(VENV_DIR)/bin/activate
# creates the virtualenv unless it already exists
$(VENV_DIR):
python -m venv $(VENV_DIR)
(source $(VENV_DIR)/bin/activate ; pip install pip-tools)
venv: $(VENV_DIR)
# install pinned dependencies and package itself in editable mode
dep-sync: $(VENV_DIR)
(source $(VENV_ACTIVATE); pip install -r requirements-dev.txt ; pip install -e .[impersonate_browser])
# creates a virtualenv with development dependencies installed
dev-init: dep-sync
@echo
@echo "Development virtualenv prepared! Activate with:"
@echo " source $(VENV_ACTIVATE)"
# update pinned versions of abstract dependencies from setup.py
dep-update:
(source $(VENV_ACTIVATE) ; pip-compile --upgrade --resolver=backtracking -o requirements.txt)
(source $(VENV_ACTIVATE) ; pip-compile --upgrade --resolver=backtracking --extra test -o requirements-dev.txt)
# build release under 'dist/'
dist:
python setup.py sdist bdist_wheel
# push release archives to PyPi
publish: dist
twine check --strict dist/*
twine upload dist/*
rm -rf build dist garminexport.egg-info
clean:
find -name '*~' -exec rm {} \;
find -name '*pyc' -exec rm {} \;
rm -rf build dist garminexport.egg-info
test:
pytest --cov=garminexport
ci-test:
pytest tests --junitxml=report.xml