forked from amphibian-dev/toad
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
67 lines (47 loc) · 1.35 KB
/
Makefile
File metadata and controls
67 lines (47 loc) · 1.35 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
.PHONY: build test
PYTHON = python3
PIP = pip3
SUDO ?=
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = toad
DOCSDIR = docs
SOURCEDIR := $(DOCSDIR)/source
BUILDDIR := $(DOCSDIR)/build
PATCHELF_VERSION = 0.10
ifeq ('$(shell type -P python3)','')
PYTHON = python
endif
ifeq ('$(shell type -P pip3)','')
PIP = pip
endif
install:
$(SUDO) $(PIP) install numpy pytest Cython
$(SUDO) $(PIP) install -e .
uninstall:
cat files.txt | xargs rm -rf
test:
$(PYTHON) -m pytest -x ./tests
build_deps:
$(SUDO) $(PIP) install -U wheel setuptools twine
build: build_deps
$(PYTHON) setup.py build_ext --inplace
dist: build
$(SUDO) $(PYTHON) setup.py sdist
dist_wheel: build
$(SUDO) $(PYTHON) setup.py bdist_wheel --universal
patchelf:
wget http://nixos.org/releases/patchelf/patchelf-$(PATCHELF_VERSION)/patchelf-$(PATCHELF_VERSION).tar.bz2
tar xf patchelf-$(PATCHELF_VERSION).tar.bz2
cd patchelf-$(PATCHELF_VERSION) && ./configure && sudo make install
manylinux_docker:
docker pull $(DOCKER_IMAGE)
dist_manylinux: build dist manylinux_docker
docker run --rm -e PLAT=$(PLAT) -v $(shell pwd):/io $(DOCKER_IMAGE) $(PRE_CMD) /io/scripts/build_wheels.sh
upload:
twine check dist/*
@twine upload dist/* -u $(TWINE_USER) -p $(TWINE_PASS)
clean:
@rm -rf build/ dist/ *.egg-info/
docs: build
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)