forked from gevent/gevent
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.ext
107 lines (75 loc) · 3.39 KB
/
Makefile.ext
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# This file is renamed to "Makefile.ext" in release tarballs so that setup.py won't try to
# run it. If you want setup.py to run "make" automatically, rename it back to "Makefile".
PYTHON ?= python${TRAVIS_PYTHON_VERSION}
CYTHON ?= cython
all: gevent/gevent.core.c gevent/gevent.ares.c gevent/gevent._semaphore.c gevent/gevent._util.c
gevent/gevent.core.c: gevent/core.ppyx gevent/libev.pxd
$(PYTHON) util/cythonpp.py -o gevent.core.c gevent/core.ppyx
echo >> gevent.core.c
echo '#include "callbacks.c"' >> gevent.core.c
mv gevent.core.* gevent/
gevent/gevent.ares.c: gevent/ares.pyx gevent/*.pxd
$(CYTHON) -o gevent.ares.c gevent/ares.pyx
mv gevent.ares.* gevent/
gevent/gevent._semaphore.c: gevent/_semaphore.pyx
$(CYTHON) -o gevent._semaphore.c gevent/_semaphore.pyx
mv gevent._semaphore.* gevent/
gevent/gevent._util.c: gevent/_util.pyx
$(CYTHON) -o gevent._util.c gevent/_util.pyx
mv gevent._util.* gevent/
clean:
rm -f gevent.core.c gevent.core.h core.pyx gevent/gevent.core.c gevent/gevent.core.h gevent/core.pyx
rm -f gevent.ares.c gevent.ares.h gevent/gevent.ares.c gevent/gevent.ares.h
rm -f gevent._semaphore.c gevent._semaphore.h gevent/gevent._semaphore.c gevent/gevent._semaphore.h
rm -f gevent._util.c gevent._util.h gevent/gevent._util.c gevent/gevent._util.h
doc:
cd doc && PYTHONPATH=.. make html
whitespace:
! find . -not -path "./.git/*" -not -path "./build/*" -not -path "./libev/*" -not -path "./c-ares/*" -not -path "./doc/_build/*" -type f | xargs egrep -l " $$"
pep8:
${PYTHON} `which pep8` .
pyflakes:
${PYTHON} util/pyflakes.py
lint: whitespace pep8 pyflakes
travistest:
which ${PYTHON} || true
${PYTHON} --version
cd greenlet-* && ${PYTHON} setup.py install -q
${PYTHON} -c 'import greenlet; print (greenlet, greenlet.__version__)'
${PYTHON} setup.py install
make bench
cd greentest && GEVENT_RESOLVER=thread ${PYTHON} testrunner.py --config ../known_failures.py
cd greentest && GEVENT_RESOLVER=ares GEVENTARES_SERVERS=8.8.8.8 ${PYTHON} testrunner.py --config ../known_failures.py --ignore tests_that_dont_use_resolver.txt
cd greentest && GEVENT_FILE=thread ${PYTHON} testrunner.py --config ../known_failures.py `grep -l subprocess test_*.py`
bench:
${PYTHON} greentest/bench_sendall.py
travis_cpython:
sudo add-apt-repository -y ppa:chris-lea/cython
sudo add-apt-repository -y ppa:fkrull/deadsnakes
sudo apt-get -qq -y update
sudo -E apt-get -qq -y install ${PYTHON} ${PYTHON}-dev
sudo apt-get -qq -y install cython
cython --version
pip install -q --download . greenlet
unzip -q greenlet-*.zip
sudo -E make travistest
sudo -E apt-get -qq -y install ${PYTHON}-dbg
sudo -E PYTHON=${PYTHON}-dbg GEVENTSETUP_EV_VERIFY=3 make travistest
travis_cpython_25:
sudo add-apt-repository -y ppa:fkrull/deadsnakes
sudo add-apt-repository -y ppa:chris-lea/cython
sudo apt-get -qq -y update
sudo -E apt-get -qq -y install ${PYTHON} ${PYTHON}-dev
sudo apt-get -qq -y install cython
cython --version
pip install -q --download . greenlet
unzip -q greenlet-*.zip
pip install -q --download . multiprocessing
tar -xf multiprocessing*tar.gz
cd multiprocessing* && sudo ${PYTHON} setup.py install
sudo apt-get install libssl-dev libkrb5-dev libbluetooth-dev
pip install -q --download . ssl || true
tar -xf ssl*tar.gz
cd ssl* && sudo ${PYTHON} setup.py install
sudo -E make travistest
.PHONY: clean all doc pep8 whitespace pyflakes lint travistest travis