Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/python-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ jobs:
strategy:
matrix:
python-version:
- "3.7"
- "3.9"
- "3.13"
- "pypy-3.7"
- "pypy-3.9"
- "pypy-3.11"
runs-on: ubuntu-22.04
steps:
Expand All @@ -28,7 +28,7 @@ jobs:
- name: Install Python package
working-directory: git-repo
run: |
python -m pip install .
python -m pip install --group test .
- name: Run tests
run: |
python -m sounddevice
Expand Down
8 changes: 3 additions & 5 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ build:
jobs:
post_checkout:
- git fetch --unshallow || true
python:
install:
- method: pip
path: .
- requirements: doc/requirements.txt
install:
- pip install --upgrade pip
- pip install --group doc .
sphinx:
configuration: doc/conf.py
formats: all
6 changes: 3 additions & 3 deletions make_dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ PYTHON=python3

make_wheel()
{
# This makes sure that only the appropriate libraries are copied:
rm -rf sounddevice.egg-info/

PYTHON_SOUNDDEVICE_PLATFORM=$1 PYTHON_SOUNDDEVICE_ARCHITECTURE=${2:-} \
$PYTHON -m build
}
Expand All @@ -19,8 +22,5 @@ make_wheel Windows 32bit

make_wheel Windows 64bit

# This makes sure that the libraries are not copied to the final sdist:
rm -rf sounddevice.egg-info/

# This creates a "pure" wheel:
make_wheel Linux
38 changes: 37 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
[build-system]
requires = ["setuptools >= 61.0"]
requires = ["setuptools", "cffi"]
build-backend = "setuptools.build_meta"

[project]
name = "sounddevice"
license = "MIT"
dynamic = ["version"]
description = "Play and Record Sound with Python"
readme = "README.rst"
keywords = ["sound", "audio", "PortAudio", "play", "record", "playrec"]
authors = [{ name = "Matthias Geier", email = "[email protected]" }]
classifiers = [
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: Multimedia :: Sound/Audio",
]
requires-python = ">=3.7"
dependencies = ["cffi"]

[project.optional-dependencies]
numpy = ["numpy"]

[dependency-groups]
dev = [{ include-group = "test" }, { include-group = "doc" }]
test = []
doc = [
"insipid-sphinx-theme",
"sphinx-last-updated-by-git",
]

[project.urls]
Documentation = "https://python-sounddevice.readthedocs.io/"
Repository = "https://github.com/spatialaudio/python-sounddevice/"
Issues = "https://github.com/spatialaudio/python-sounddevice/issues"

[tool.setuptools.dynamic]
version = { attr = "sounddevice.__version__" }
31 changes: 0 additions & 31 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
import platform
from setuptools import setup

# "import" __version__
__version__ = 'unknown'
for line in open('sounddevice.py'):
if line.startswith('__version__'):
exec(line)
break

MACOSX_VERSIONS = '.'.join([
'macosx_10_6_x86_64', # for compatibility with pip < v21
'macosx_10_6_universal2',
Expand Down Expand Up @@ -63,34 +56,10 @@ def get_tag(self):
cmdclass = {'bdist_wheel': bdist_wheel_half_pure}

setup(
name='sounddevice',
version=__version__,
py_modules=['sounddevice'],
packages=packages,
package_data=package_data,
zip_safe=zip_safe,
python_requires='>=3.7',
setup_requires=['CFFI>=1.0'],
install_requires=['CFFI>=1.0'],
extras_require={'NumPy': ['NumPy']},
cffi_modules=['sounddevice_build.py:ffibuilder'],
author='Matthias Geier',
author_email='[email protected]',
description='Play and Record Sound with Python',
long_description=open('README.rst').read(),
license='MIT',
keywords='sound audio PortAudio play record playrec'.split(),
url='http://python-sounddevice.readthedocs.io/',
project_urls={
'Source': 'https://github.com/spatialaudio/python-sounddevice',
},
platforms='any',
classifiers=[
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Topic :: Multimedia :: Sound/Audio',
],
cmdclass=cmdclass,
)
Loading