diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-05-11 05:06:07 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-05-11 05:06:07 +0000 |
commit | ee6e9789420f9e81a34a3df7afcaf3bd7ac0c7d1 (patch) | |
tree | 64f8c90740adbe25c30379d6567fd2acafcbd2dd /cffi/setuptools_ext.py | |
parent | cfef9f25f39bdaf362b7cbccc51720e3a0ed3d35 (diff) | |
parent | 046d35db06dec26c759b92b7d8de38a979d84c0b (diff) | |
download | cffi-ee6e9789420f9e81a34a3df7afcaf3bd7ac0c7d1.tar.gz |
Snap for 8570526 from 046d35db06dec26c759b92b7d8de38a979d84c0b to mainline-media-swcodec-releaseaml_swc_331911000aml_swc_331712000aml_swc_331612000aml_swc_331511000aml_swc_331410000aml_swc_331318000aml_swc_331116000aml_swc_331012020android13-mainline-media-swcodec-release
Change-Id: I25ab4fac7810181b81cdda451d2aa7121266db70
Diffstat (limited to 'cffi/setuptools_ext.py')
-rw-r--r-- | cffi/setuptools_ext.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cffi/setuptools_ext.py b/cffi/setuptools_ext.py index df5a518..8fe3614 100644 --- a/cffi/setuptools_ext.py +++ b/cffi/setuptools_ext.py @@ -84,11 +84,13 @@ def _set_py_limited_api(Extension, kwds): On Windows, with CPython <= 3.4, it's better not to use py_limited_api because virtualenv *still* doesn't copy PYTHON3.DLL on these versions. - For now we'll skip py_limited_api on all Windows versions to avoid an - inconsistent mess. + Recently (2020) we started shipping only >= 3.5 wheels, though. So + we'll give it another try and set py_limited_api on Windows >= 3.5. """ + from cffi import recompiler + if ('py_limited_api' not in kwds and not hasattr(sys, 'gettotalrefcount') - and sys.platform != 'win32'): + and recompiler.USE_LIMITED_API): import setuptools try: setuptools_major_version = int(setuptools.__version__.partition('.')[0]) |