mirror of
https://github.com/Legrandin/pycryptodome.git
synced 2025-10-19 16:03:45 +00:00
Set py-limited-api dynamically
This commit is contained in:
parent
703edb3241
commit
13a8461e06
2 changed files with 10 additions and 3 deletions
|
@ -6,8 +6,5 @@ project_urls =
|
|||
Source=https://github.com/Legrandin/pycryptodome/
|
||||
Changelog=https://www.pycryptodome.org/src/changelog
|
||||
|
||||
[bdist_wheel]
|
||||
py-limited-api = cp36
|
||||
|
||||
[build_sphinx]
|
||||
source-dir = Doc
|
||||
|
|
10
setup.py
10
setup.py
|
@ -36,6 +36,7 @@ import os
|
|||
import sys
|
||||
import shutil
|
||||
import struct
|
||||
import sysconfig
|
||||
|
||||
sys.path.append(os.getcwd())
|
||||
|
||||
|
@ -497,6 +498,14 @@ with open(os.path.join("lib", package_root, "__init__.py")) as init_root:
|
|||
|
||||
version_string = ".".join([str(x) for x in version_tuple])
|
||||
|
||||
# Set the minimum ABI3 version for bdist_wheel to 3.6
|
||||
# unless Python is running without GIL (as there is no established way yet to
|
||||
# specify multiple ABI levels)
|
||||
setup_options = {}
|
||||
if sys.version_info[0] > 2:
|
||||
if not sysconfig.get_config_var('Py_GIL_DISABLED'):
|
||||
setup_options['options'] = {'bdist_wheel': {'py_limited_api': 'cp36'}}
|
||||
|
||||
setup(
|
||||
name=project_name,
|
||||
version=version_string,
|
||||
|
@ -538,4 +547,5 @@ setup(
|
|||
'test': TestCommand,
|
||||
},
|
||||
ext_modules=ext_modules,
|
||||
**setup_options
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue