diff options
author | Lucia Li <luciali@google.com> | 2021-11-08 21:45:14 +0800 |
---|---|---|
committer | Lucia Li <luciali@google.com> | 2021-11-09 11:01:46 +0800 |
commit | 6aa63b08263172a979012747497f4207cc341bb0 (patch) | |
tree | 64f8c90740adbe25c30379d6567fd2acafcbd2dd /cffi/setuptools_ext.py | |
parent | 3e013ad5e4325c9a301ddde47e997bfd797167cd (diff) | |
download | cffi-6aa63b08263172a979012747497f4207cc341bb0.tar.gz |
Upgrade cffi from 1.12.2 to 1.15.0
Source is fetched from
https://foss.heptapod.net/pypy/cffi/-/archive/branch/release-1.15/cffi-branch-release-1.15.zip
Build cffi manually and update Android.bp
Bug: 205265538
Test: None
Change-Id: I91a5ed3b96029b3988602aba6a00c0e0748d0600
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]) |