File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ # mypy is special in that they distribute a C extension only for CPython,
2+ # and while it looks like you are supposed to be able to do
3+ # MYPY_USE_MYPYC pip install --no-binary mypy
4+ # to compile the C extension yourself, I get an error when I try that.
5+ # So instead, clone their repo and build it from there.
6+
7+ set -e
8+
9+ if [ -z " $1 " ]; then
10+ echo " Usage: $0 python_executable"
11+ exit 1
12+ fi
13+
14+ BINARY=$1
15+
16+ set -u
17+ set -x
18+
19+ ENV=/tmp/macrobenchmark_env
20+ rm -rf $ENV
21+ virtualenv -p $BINARY $ENV
22+
23+ rm -rf /tmp/mypy
24+ git clone --depth 1 --branch v0.790 https://github.com/python/mypy/ /tmp/mypy
25+ cd /tmp/mypy
26+
27+ $ENV /bin/pip install -r mypy-requirements.txt
28+ $ENV /bin/pip install --upgrade setuptools
29+ git submodule update --init mypy/typeshed
30+ $ENV /bin/python setup.py --use-mypyc install
31+
32+ cd -
33+ time $ENV /bin/python benchmarks/mypy_bench.py 50
34+ time $ENV /bin/python benchmarks/mypy_bench.py 50
35+ time $ENV /bin/python benchmarks/mypy_bench.py 50
36+
You can’t perform that action at this time.
0 commit comments