-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
44 lines (35 loc) · 797 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
LIBSLOPE_API_URL := https://api.github.com/repos/jolars/libslope/releases/latest
LIBSLOPE_RELEASE := $(shell curl -s $(LIBSLOPE_API_URL) | grep "tarball_url" | cut -d '"' -f 4)
all: install
.PHONY: install
install:
pip install -e .[tests,docs]
.PHONY: build
build:
rm -rf dist
python -m build
.PHONY: test-pypi
test-pypi:
python -m twine upload --repository testpypi dist/*
.PHONY: clean
clean:
rm -rf src/*.o src/*.so
.PHONY: test
test:
pytest
cd docs ;\
make doctest
.PHONY: docs
docs:
cd docs ;\
make html
.PHONY: autodoc
autodoc:
sphinx-autobuild docs/source docs/build --watch sortedl1
.PHONY: update-libslope
update-libslope:
@mkdir -p tmp
@curl -L $(LIBSLOPE_RELEASE) | tar -xz --strip-components=1 -C tmp
@rm -rf src/slope
@cp -ri tmp/src/slope src/
@rm -rf tmp