3232# Clang package we use on Linux
3333LLVM_URL = 'https://github.com/mypyc/mypy_mypyc-wheels/releases/download/llvm/llvm-centos-5.tar.gz'
3434
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-
4135# Mypy repository root
4236ROOT_DIR = os .path .dirname (os .path .dirname (__file__ ))
4337
@@ -59,22 +53,18 @@ def create_environ(python_version: str) -> Dict[str, str]:
5953 #
6054 # TODO: remove use of mypy-requirements.txt once we no longer need to support
6155 # building pre modular typeshed releases
62- install_deps = """
56+ env [ 'CIBW_BEFORE_BUILD' ] = """
6357 pip install -r {package}/mypy-requirements.txt &&
6458 (pip install -r {package}/build-requirements.txt || true)
6559 """ .replace ('\n ' , ' ' )
66- env ['CIBW_BEFORE_BUILD' ] = install_deps
6760
6861 # download a copy of clang to use to compile on linux. this was probably built in 2018,
6962 # 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
7868
7969 # the double negative is counterintuitive, https://github.com/pypa/pip/issues/5735
8070 env ['CIBW_ENVIRONMENT' ] = 'MYPY_USE_MYPYC=1 MYPYC_OPT_LEVEL=3 PIP_NO_BUILD_ISOLATION=no'
0 commit comments