summaryrefslogtreecommitdiff
path: root/cffi
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2020-08-12 23:02:12 +0200
committerArmin Rigo <arigo@tunes.org>2020-08-12 23:02:12 +0200
commitb43cd975844bce0c361e5b3cd05bb1350de496c9 (patch)
tree4cfb610b41a1f4ef0993a1b16d583ef1bb515878 /cffi
parent7b625cda8c6ee5ad2a55b559aa5a9f92c3714eec (diff)
downloadcffi-b43cd975844bce0c361e5b3cd05bb1350de496c9.tar.gz
#355 #350
Yet another attempt at setting Py_LIMITED_API on Windows
Diffstat (limited to 'cffi')
-rw-r--r--cffi/setuptools_ext.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cffi/setuptools_ext.py b/cffi/setuptools_ext.py
index df5a518..dabf2f3 100644
--- a/cffi/setuptools_ext.py
+++ b/cffi/setuptools_ext.py
@@ -84,11 +84,11 @@ 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.
"""
if ('py_limited_api' not in kwds and not hasattr(sys, 'gettotalrefcount')
- and sys.platform != 'win32'):
+ and (sys.platform != 'win32' or sys.version_info >= (3, 5))):
import setuptools
try:
setuptools_major_version = int(setuptools.__version__.partition('.')[0])