File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
product/gradle-plugin/src Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 11import os
22import sys
33import types
4+ from importlib import import_module
45
56
67# We want to cause a quick and comprehensible failure when a package attempts to build
@@ -59,7 +60,16 @@ def disable_native_distutils():
5960 from distutils import ccompiler
6061 from distutils .unixccompiler import UnixCCompiler
6162
62- ccompiler .get_default_compiler = lambda * args , ** kwargs : "disabled"
63+ # In newer versions of Setuptools, ccompiler imports all of its symbols from
64+ # elsewhere.
65+ compiler_mods = [ccompiler ]
66+ original_mod_name = ccompiler .get_default_compiler .__module__
67+ if original_mod_name != ccompiler .__name__ :
68+ compiler_mods .append (import_module (original_mod_name ))
69+
70+ for mod in compiler_mods :
71+ mod .get_default_compiler = lambda * args , ** kwargs : "disabled"
72+
6373 ccompiler .compiler_class ["disabled" ] = (
6474 "disabledcompiler" , "DisabledCompiler" ,
6575 "Compiler disabled ({})" .format (CHAQUOPY_NATIVE_ERROR ))
Original file line number Diff line number Diff line change @@ -1012,7 +1012,7 @@ def test_download_wheel(self):
10121012 # Our current version of pip shows the full URL for custom indexes, but only
10131013 # the filename for PyPI.
10141014 CHAQUO_URL = (r"https://chaquo.com/pypi-13.1/murmurhash/"
1015- r"murmurhash-0.28.0-7-cp38-cp38 -android_16_x86.whl" )
1015+ r"murmurhash-0.28.0-7-cp310-cp310 -android_16_x86.whl" )
10161016 PYPI_URL = "six-1.14.0-py2.py3-none-any.whl"
10171017
10181018 common_reqs = (["murmurhash/" + name for name in
You can’t perform that action at this time.
0 commit comments