forked from tiran/pysha3
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
67 lines (51 loc) · 1.64 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
PYTHON=python
SETUPFLAGS=
COMPILEFLAGS=
INSTALLFLAGS=
PYTHONS=python2.7 python3.4 python3.5
.PHONY: inplace all rebuild test_inplace test fulltests clean distclean
.PHONY: sdist install
all: README.html README.md
README.html: README.txt CHANGES.txt
@echo | cat README.txt - CHANGES.txt | \
rst2html --verbose --exit-status=1 > README.html
README.md: README.txt CHANGES.txt
@echo | cat README.txt - CHANGES.txt | \
pandoc --from=rst --to=markdown > $@
inplace:
$(PYTHON) setup.py $(SETUPFLAGS) build_ext -i $(COMPILEFLAGS)
rebuild: clean all
test_inplace: inplace
$(PYTHON) -m tests
test: test_inplace
fulltest:
$(MAKE) clean
@set -e; \
for python in $(PYTHONS); do \
$$python $(SETUPFLAGS) setup.py -q test; \
done
$(MAKE) clean
clean:
@find . \( -name '*.o' -or -name '*.so' -or -name '*.sl' -or \
-name '*.py[cod]' -or -name README.html \) \
-and -type f -delete
distclean: clean
@rm -rf build
@rm -rf dist
@find . \( -name '~*' -or -name '*.orig' -or -name '*.bak' -or \
-name 'core*' \) -and -type f -delete
install:
$(PYTHON) setup.py $(SETUPFLAGS) build $(COMPILEFLAGS)
$(PYTHON) setup.py install $(INSTALLFLAGS)
dist: clean sdist manylinux1
sdist: README.html README.md
$(PYTHON) setup.py sdist --formats gztar,zip
manylinux1: clean
docker run --rm -v $(CURDIR):/io:Z \
-e BUILD_UID=$(shell id -u) -e BUILD_GID=$(shell id -g) \
quay.io/pypa/manylinux1_x86_64:latest \
/io/extras/build-wheels.sh
docker run --rm -v $(CURDIR):/io:Z \
-e BUILD_UID=$(shell id -u) -e BUILD_GID=$(shell id -g) \
quay.io/pypa/manylinux1_i686:latest \
linux32 /io/extras/build-wheels.sh