Skip to content

Commit

Permalink
Set py-limited-api dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
Legrandin committed Aug 12, 2024
1 parent d2a1d37 commit 9174b34
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 0 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 8 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,13 @@ def create_cryptodome_lib():

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 't' not in getattr(sys, 'abiflags', ''):
setup_options['options'] = {'bdist_wheel': {'py_limited_api': 'cp36'}}

setup(
name=project_name,
version=version_string,
Expand Down Expand Up @@ -538,4 +545,5 @@ def create_cryptodome_lib():
'test': TestCommand,
},
ext_modules=ext_modules,
**setup_options
)

0 comments on commit 9174b34

Please sign in to comment.