forked from usgs/waterdataui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (36 loc) · 1.24 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
PYTHON := wdfn-server/env/bin/python
PIP := wdfn-server/env/bin/pip
.PHONY: env-wdfn test-wdfn clean-wdfn cleanenv-wdfn watch-wdfn
build-wdfn: build-assets
@echo 'Building wdfn-server...'
cd wdfn-server && ./env/bin/python setup.py bdist_wheel
clean-wdfn:
@echo 'Cleaning wdfn-server...'
rm -rf wdfn-server/dist
rm -rf wdfn-server/build
#
# Development targets
#
test-wdfn:
wdfn-server/env/bin/coverage run --omit=wdfn-server/waterdata/tests/*.py,wdfn-server/env/* -m pytest wdfn-server/waterdata
wdfn-server/env/bin/coverage xml
watch-wdfn:
$(PYTHON) wdfn-server/run.py
#
# Environment configuration targets
#
env-wdfn: wdfn-server/env wdfn-server/instance/config.py wdfn-env-requirements
wdfn-server/env:
@echo 'Creating the virtualenv env'
virtualenv --python=python3 --no-download wdfn-server/env
$(PIP) install --upgrade pip
wdfn-env-requirements:
@echo 'Installing requirements.txt'
$(PIP) install -r wdfn-server/requirements.txt -r wdfn-server/requirements-dev.txt
wdfn-server/instance/config.py:
@echo 'Creating wdfn-server/instance/config.py...'
mkdir -p wdfn-server/instance
cp wdfn-server/config.py.sample wdfn-server/instance/config.py
cleanenv-wdfn: clean-wdfn
@echo 'Cleaning graph-server environment...'
rm -rf wdfn-server/env