summaryrefslogtreecommitdiff
path: root/cffi/setuptools_ext.py
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2016-08-22 17:40:18 +0200
committerArmin Rigo <arigo@tunes.org>2016-08-22 17:40:18 +0200
commit2401c14d0a24079b305cc3ecf36f84a1ea663d7c (patch)
treecff1e994ed00997f24fba45bb44acd8595aa830c /cffi/setuptools_ext.py
parente1b333b53770132028c13d2b57dfb177a6f0cca8 (diff)
downloadcffi-2401c14d0a24079b305cc3ecf36f84a1ea663d7c.tar.gz
If we don't know the version number of setuptools, we try to set
'py_limited_api' anyway. At worst, we get a warning.
Diffstat (limited to 'cffi/setuptools_ext.py')
-rw-r--r--cffi/setuptools_ext.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/cffi/setuptools_ext.py b/cffi/setuptools_ext.py
index 6ec11ba..24afddf 100644
--- a/cffi/setuptools_ext.py
+++ b/cffi/setuptools_ext.py
@@ -82,7 +82,10 @@ def _set_py_limited_api(Extension, kwds):
if setuptools_major_version >= 26:
kwds['py_limited_api'] = True
except ValueError: # certain development versions of setuptools
- pass
+ # If we don't know the version number of setuptools, we
+ # try to set 'py_limited_api' anyway. At worst, we get a
+ # warning.
+ kwds['py_limited_api'] = True
return kwds
def _add_c_module(dist, ffi, module_name, source, source_extension, kwds):