mirror of
https://github.com/arcctgx/ARver
synced 2025-06-07 07:43:40 +02:00
Move essential settings from setup.py to pyproject.toml, leaving only the definition of the C extension. Add some trailing commas in the setup() call to tell YAPF not to collapse the function arguments too much. Add module docstring to setup.py. I'm not using a PEP 639 compliant license expression in pyproject.toml yet. This is because of supported Python version constraints: the most recent setuptools version that still supports Python 3.7 is 68.0.0, while the PEP 639 license expressions are only supported from 77.0.3. I guess I'll have to live with the deprecation warnings until I drop support for the older Python versions.
19 lines
532 B
Python
19 lines
532 B
Python
"""ARver C extension definitions."""
|
|
|
|
from setuptools import Extension, setup
|
|
|
|
setup(
|
|
ext_modules=[
|
|
Extension('arver.audio._audio',
|
|
sources=['arver/audio/_audio.c'],
|
|
libraries=['sndfile', 'z'],
|
|
extra_compile_args=['-std=c99', '-O3', '-D_DEFAULT_SOURCE'],
|
|
define_macros=[('Py_LIMITED_API', '0x03070000')],
|
|
py_limited_api=True),
|
|
],
|
|
options={
|
|
'bdist_wheel': {
|
|
'py_limited_api': 'cp37'
|
|
},
|
|
},
|
|
)
|