-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (30 loc) · 853 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
# todo: this horrible thing is needed to deal with an back incompat thing in notanorm
NOTANORM := $(shell pip freeze | grep notanorm)
env:
python -mvirtualenv env
mkdir env/bin 2> /dev/null || true
wheel-env:
python -mvirtualenv wheel-env
mkdir wheel-env/bin 2> /dev/null || true
requirements: env
python -mpip install --isolated -r requirements.txt
lint:
python -m pylint snostr
black snostr
black:
black snostr tests
test:
pytest -n=3 --cov snostr -v tests
dist:
rm -rf dist
python -m build .
test-wheel: wheel-env
cp wheel-env/scripts/activate wheel-env/bin/activate 2> /dev/null || true
. wheel-env/bin/activate && pip install .
. wheel-env/bin/activate && snostr --self-test
publish: dist
twine upload dist/*
install-hooks:
pre-commit install
.PHONY: black publish requirements lint install-hooks dist
.DELETE_ON_ERROR: