32
32
# Clang package we use on Linux
33
33
LLVM_URL = 'https://github.com/mypyc/mypy_mypyc-wheels/releases/download/llvm/llvm-centos-5.tar.gz'
34
34
35
- # Script to configure 64-bit MSVC compiler executable
36
- VCVARS64 = (
37
- r'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise' +
38
- r'\VC\Auxiliary\Build\vcvars64.bat'
39
- )
40
-
41
35
# Mypy repository root
42
36
ROOT_DIR = os .path .dirname (os .path .dirname (__file__ ))
43
37
@@ -59,22 +53,18 @@ def create_environ(python_version: str) -> Dict[str, str]:
59
53
#
60
54
# TODO: remove use of mypy-requirements.txt once we no longer need to support
61
55
# building pre modular typeshed releases
62
- install_deps = """
56
+ env [ 'CIBW_BEFORE_BUILD' ] = """
63
57
pip install -r {package}/mypy-requirements.txt &&
64
58
(pip install -r {package}/build-requirements.txt || true)
65
59
""" .replace ('\n ' , ' ' )
66
- env ['CIBW_BEFORE_BUILD' ] = install_deps
67
60
68
61
# download a copy of clang to use to compile on linux. this was probably built in 2018,
69
62
# speeds up compilation 2x
70
- env ['CIBW_BEFORE_BUILD_LINUX' ] = (
71
- "(cd / && curl -L %s | tar xzf -) && %s" % (LLVM_URL , install_deps )
72
- )
73
-
74
- # IMPORTANT: The build can run out of memory if we don't use a 64-bit compiler on Windows.
75
- env ['CIBW_BEFORE_BUILD_WINDOWS' ] = (
76
- 'call "%s" && %s' % (VCVARS64 , install_deps )
77
- )
63
+ env ['CIBW_BEFORE_BUILD_LINUX' ] = """
64
+ (cd / && curl -L %s | tar xzf -) &&
65
+ pip install -r {package}/mypy-requirements.txt &&
66
+ (pip install -r {package}/build-requirements.txt || true)
67
+ """ .replace ('\n ' , ' ' ) % LLVM_URL
78
68
79
69
# the double negative is counterintuitive, https://github.com/pypa/pip/issues/5735
80
70
env ['CIBW_ENVIRONMENT' ] = 'MYPY_USE_MYPYC=1 MYPYC_OPT_LEVEL=3 PIP_NO_BUILD_ISOLATION=no'
0 commit comments