32 Commits

Author SHA1 Message Date
Mo-way 8bcf03f288 Fix 404 Links in the Docs 2026-05-26 21:33:56 +02:00
Lars Immisch 2a2fa8f742 Update local build instructions wherever setup.py is greppable. 2025-12-10 23:05:14 +01:00
Lars Immisch acc6f152a3 Adressing TODO in release.yml
Initial test with test.pypi.org was successful
2025-12-01 23:26:37 +01:00
Matteo Bernardini 0d6e0e7bb4 chore: use makefile for reference on building sdist and wheels 2025-12-01 23:26:37 +01:00
Matteo Bernardini 4f3c299e53 fix: drop py2 trove classifier 2025-12-01 23:26:37 +01:00
Matteo Bernardini e78c145d9e ci: deploy on tags only 2025-12-01 23:26:37 +01:00
Matteo Bernardini 6acae81487 ci: fix permissions 2025-12-01 23:26:37 +01:00
Matteo Bernardini 5eed8adfe5 ci: install ALSA headers 2025-12-01 23:26:37 +01:00
Matteo Bernardini e3e51cc34d ci: install uv 2025-12-01 23:26:37 +01:00
Matteo Bernardini f6f53ce92a ci: automatically build docs 2025-12-01 23:26:37 +01:00
Matteo Bernardini 38d0882379 chore: split dependency groups 2025-12-01 23:26:37 +01:00
Matteo Bernardini 6822cffcc8 ci: remove unsupported setting 2025-12-01 23:26:37 +01:00
Matteo Bernardini 8c1e370e04 ci: auto-detect package manager to use 2025-12-01 23:26:37 +01:00
Matteo Bernardini 6d17bc92b7 ci: use legacy license definition to allow building on py3.9 2025-12-01 23:26:37 +01:00
Matteo Bernardini 3e41a9eb97 ci: enforce setuptools version 2025-12-01 23:26:37 +01:00
Matteo Bernardini df8886dde1 ci: ensure alsa headers are installed 2025-12-01 23:26:37 +01:00
Matteo Bernardini aac2843f73 chore: stub workflow for automatic docs deployment 2025-12-01 23:26:37 +01:00
Matteo Bernardini 7987986ee4 chore: top-level makefile for common dev tasks 2025-12-01 23:26:37 +01:00
Matteo Bernardini ae93ddc48e ci: workflow to automate releases on tags 2025-12-01 23:26:37 +01:00
Matteo Bernardini a48389b750 chore: make pyright happy on tests 2025-12-01 23:26:37 +01:00
Matteo Bernardini 0b8db5f46d fix: PCM constructor stubs not coherent with runtime 2025-12-01 23:26:37 +01:00
Matteo Bernardini 6b2c4c22db fix(docs): add sphinx dep, fix version retrieval 2025-12-01 23:26:37 +01:00
Matteo Bernardini a7896ee069 fix: stub consistency to runtime 2025-12-01 23:26:37 +01:00
Matteo Bernardini ed83b3e29b chore(deps): add mypy (for stubtest utility) 2025-12-01 23:26:37 +01:00
Matteo Bernardini e96f550862 fix: use Final for enum constants 2025-12-01 23:26:37 +01:00
Matteo Bernardini 40f4647d8c fix: missing self in type stubs 2025-12-01 23:26:37 +01:00
Matteo Bernardini 3a8c53851d chore(deps): add pyright for type-checking 2025-12-01 23:26:37 +01:00
Matteo Bernardini f6770e3a42 fix: add ALSAAudioError to type stubs 2025-12-01 23:26:37 +01:00
Matteo Bernardini 0ac28e9eea fix: include doc/ and examples/ in sdist 2025-12-01 23:26:37 +01:00
Matteo Bernardini fdc5f3782e 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`
2025-12-01 23:26:37 +01:00
Matteo Bernardini 6efef83429 chore: move unit tests to conventional directory 2025-12-01 23:26:37 +01:00
Matteo Bernardini df5c2f4685 chore: move examples to dedicated directory 2025-12-01 23:26:37 +01:00
6 changed files with 19 additions and 45 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ on:
workflow_dispatch:
push:
branches:
- mttbernardini/chore/modern-packaging
- main
concurrency:
group: "pages"
+1 -5
View File
@@ -42,8 +42,7 @@ jobs:
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
# TODO: set environment back to pypi after testing
environment: testpypi
environment: pypi
permissions:
id-token: write
steps:
@@ -54,6 +53,3 @@ jobs:
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
# TODO: delete below once workflow is proved functional
with:
repository-url: https://test.pypi.org/legacy/
+7 -12
View File
@@ -2,7 +2,7 @@
For documentation, see http://larsimmisch.github.io/pyalsaaudio/
> Author: Casper Wilstrup (cwi@aves.dk)
> Author: Casper Wilstrup (cwi@aves.dk)
> Maintainer: Lars Immisch (lars@ibp.de)
This package contains wrappers for accessing the
@@ -46,14 +46,9 @@ First, get the sources and change to the source directory:
$ cd pyalsaaudio
```
Then, build:
Then, build and install:
```
$ python setup.py build
```
And install:
```
$ sudo python setup.py install
$ pip install .
```
# Using the API
@@ -62,8 +57,8 @@ distribution; it is also online on [http://larsimmisch.github.io/pyalsaaudio/](h
There are some example programs included with the source:
* [playwav.py](https://github.com/larsimmisch/pyalsaaudio/blob/master/playwav.py) plays back a wav file
* [playbacktest.py](https://github.com/larsimmisch/pyalsaaudio/blob/master/playbacktest.py) plays back raw sound data read from stdin
* [recordtest.py](https://github.com/larsimmisch/pyalsaaudio/blob/master/recordtest.py) captures sound from the microphone and writes
* [playwav.py](./examples/playwav.py) plays back a wav file
* [playbacktest.py](./examples/playbacktest.py) plays back raw sound data read from stdin
* [recordtest.py](./examples/recordtest.py) captures sound from the microphone and writes
it raw to stdout.
* [mixertest.py](https://github.com/larsimmisch/pyalsaaudio/blob/master/mixertest.py) can be used to manipulate the mixers.
* [mixertest.py](./examples/mixertest.py) can be used to manipulate the mixers.
+8 -18
View File
@@ -1,28 +1,18 @@
# Make a new release
Update the version in setup.py
Create and push a tag naming the version (i.e. 0.11.1):
pyalsa_version = '0.9.0'
git tag 0.11.1
git push origin 0.11.1
Commit and push the update.
Create and push a tag naming the version (i.e. 0.9.0):
git tag 0.9.0
git push origin 0.9.0
Create the package:
python3 setup.py sdist
Upload the package
twine upload dist/*
Don't forget to update the documentation.
This should trigger a build via a github actions and publish pre-built binaries to pypi.org
# Publish the documentation
All commits to main should trigger a rebuild of the documentation.
## Historical background
The documentation is published through the `gh-pages` branch.
To publish the documentation, you need to clone the `gh-pages` branch of this repository into
-3
View File
@@ -807,9 +807,6 @@ Play back the recording with::
$ python playbacktest.py <filename>
playbacktest.py accepts the commandline option
*-d <device>*.
mixertest.py
~~~~~~~~~~~~
+2 -6
View File
@@ -77,7 +77,7 @@ Note: the wrappers link with the alsasound library (from the alsa-lib package)
and need the ALSA headers for compilation. Verify that you have
/usr/lib/libasound.so and /usr/include/alsa (or similar paths) before building.
*On Debian/Ubuntu, install libasound2-dev.*
*On Debian (and probably Ubuntu), install libasound2-dev.*
Naturally you also need to use a kernel with proper ALSA support. This is the
default in Linux kernel 2.6 and later. If you are using kernel version 2.4 you
@@ -86,11 +86,7 @@ ship with ALSA kernels.
To install, execute the following: --- ::
$ python setup.py build
And then as root: --- ::
# python setup.py install
$ pip install .
*******