/
Makefile
45 lines (32 loc) · 1.17 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
HOST=127.0.0.1
TEST_PATH=./tests
RECIPEPREFIX= # prefix char is a space, on purpose; do not delete
PHONY=clean
clean:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name 'test_app.py' -exec rm -f {} +
find . -name 'testbed_transforms.py' -exec rm -f {} +
install-deps:
pipenv install
pipenv install -e .
test-generate:
cp ./tests/testbed_transforms.py.tpl ./tests/testbed_transforms.py
export SNAP_TEST_HOME=`pwd`/tests; export PYTHONPATH=`pwd`:`pwd`/tests; cd tests; ../scripts/routegen -e ../data/good_sample_config.yaml > ../test_app.py
spinup:
export SNAP_TEST_HOME=`pwd`/tests; pipenv run python test_app.py --configfile data/good_sample_config.yaml
test: clean test-generate
export SNAP_TEST_HOME=`pwd`/tests; python -m unittest discover -s tests ./tests -v
version:
python mark_version.py > version.py && cp version.py scripts/snap-version && chmod u+x scripts/snap-version
build-dist:
python setup.py sdist bdist_wheel
build-testdist:
python test_setup.py sdist bdist_wheel
mv *.whl dist/
clean-dist:
rm -rf dist/*
rm -rf build/*
pypi-upload:
twine upload -r dist/* --repository pypi