forked from auracaster/pyalsaaudio
chore: modernise packaging.
- use pyproject.toml to define project metadata and setuptools-specific configuration, removing the need for a setup.py file - move sources in conventional src/ directory - rework stubs so that they're visible downstream. PEP-561 doesn't support top-level .pyi files, so I made a dummy package instead `alsaaudio-stubs`
This commit is contained in:
committed by
Lars Immisch
parent
6efef83429
commit
fdc5f3782e
2
.gitignore
vendored
2
.gitignore
vendored
@@ -10,5 +10,5 @@ build/
|
|||||||
dist/
|
dist/
|
||||||
.vscode/
|
.vscode/
|
||||||
/__pycache__/
|
/__pycache__/
|
||||||
/pyalsaaudio.egg-info/
|
*.egg-info/
|
||||||
*.raw
|
*.raw
|
||||||
|
|||||||
@@ -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
|
|
||||||
47
pyproject.toml
Normal file
47
pyproject.toml
Normal file
@@ -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"] }
|
||||||
|
]
|
||||||
40
setup.py
40
setup.py
@@ -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'])]
|
|
||||||
)
|
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
from typing import list
|
|
||||||
|
|
||||||
PCM_PLAYBACK: int
|
PCM_PLAYBACK: int
|
||||||
PCM_CAPTURE: int
|
PCM_CAPTURE: int
|
||||||
|
|
||||||
Reference in New Issue
Block a user