diff --git a/.gitignore b/.gitignore index bdd931d..ca51b03 100644 --- a/.gitignore +++ b/.gitignore @@ -10,5 +10,5 @@ build/ dist/ .vscode/ /__pycache__/ -/pyalsaaudio.egg-info/ +*.egg-info/ *.raw diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 8c742e8..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,6 +0,0 @@ -include *.py -include *.pyi -include CHANGES -include TODO -include LICENSE -recursive-include doc *.html *.gif *.png *.css *.py *.rst *.js *.json Makefile diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..299ac40 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,47 @@ +[project] +name = "pyalsaaudio" +version = "0.11.0" +description = "ALSA bindings" +readme.text = """ +This package contains wrappers for accessing the ALSA API from Python. +It is fairly complete for PCM devices and Mixer access. +""" +readme.content-type = "text/plain" +license="PSF-2.0" +license-files=["LICENSE"] +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Operating System :: POSIX :: Linux", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 3", + "Topic :: Multimedia :: Sound/Audio", + "Topic :: Multimedia :: Sound/Audio :: Mixers", + "Topic :: Multimedia :: Sound/Audio :: Players", + "Topic :: Multimedia :: Sound/Audio :: Capture/Recording", +] + +[[project.authors]] +name = "Casper Wilstrup" +email = "cwi@aves.dk" + +[[project.maintainers]] +name = "Lars Immisch" +email = "lars@ibp.de" + +[project.urls] +homepage = "http://larsimmisch.github.io/pyalsaaudio/" +source = "https://github.com/larsimmisch/pyalsaaudio" +documentation = "https://larsimmisch.github.io/pyalsaaudio/" +issues = "https://github.com/larsimmisch/pyalsaaudio/issues" + + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + + +[tool.setuptools] +ext-modules = [ + { name = "alsaaudio", sources = ["src/alsaaudio.c"], libraries = ["asound"] } +] \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100755 index fd5064c..0000000 --- a/setup.py +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env python - -'''This package contains wrappers for accessing the ALSA API from Python. -It is fairly complete for PCM devices and Mixer access. -''' - -from setuptools import setup -from setuptools.extension import Extension -from sys import version - -pyalsa_version = '0.11.0' - -if __name__ == '__main__': - setup( - name = 'pyalsaaudio', - version = pyalsa_version, - description = 'ALSA bindings', - long_description = __doc__, - author = 'Casper Wilstrup', - author_email='cwi@aves.dk', - maintainer = 'Lars Immisch', - maintainer_email = 'lars@ibp.de', - license='PSF', - platforms=['posix'], - url='http://larsimmisch.github.io/pyalsaaudio/', - classifiers = [ - 'Development Status :: 4 - Beta', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: Python Software Foundation License', - 'Operating System :: POSIX :: Linux', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 3', - 'Topic :: Multimedia :: Sound/Audio', - 'Topic :: Multimedia :: Sound/Audio :: Mixers', - 'Topic :: Multimedia :: Sound/Audio :: Players', - 'Topic :: Multimedia :: Sound/Audio :: Capture/Recording', - ], - ext_modules=[Extension('alsaaudio',['alsaaudio.c'], - libraries=['asound'])] - ) diff --git a/alsaaudio.pyi b/src/alsaaudio-stubs/__init__.pyi similarity index 99% rename from alsaaudio.pyi rename to src/alsaaudio-stubs/__init__.pyi index 8e92d31..8f9fa65 100644 --- a/alsaaudio.pyi +++ b/src/alsaaudio-stubs/__init__.pyi @@ -1,5 +1,3 @@ -from typing import list - PCM_PLAYBACK: int PCM_CAPTURE: int diff --git a/alsaaudio.c b/src/alsaaudio.c similarity index 100% rename from alsaaudio.c rename to src/alsaaudio.c diff --git a/uv.lock b/uv.lock new file mode 100644 index 0000000..e88217c --- /dev/null +++ b/uv.lock @@ -0,0 +1,8 @@ +version = 1 +revision = 2 +requires-python = ">=3.10" + +[[package]] +name = "pyalsaaudio" +version = "0.11.0" +source = { editable = "." }