Skip to content

Commit

Permalink
Early error with message on python < 3.13 (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeshardmind authored Jan 20, 2025
1 parent 0149da9 commit f57776d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/build-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'

- run: pipx run build --sdist
- run: pipx run --python 3.13 build --sdist

- uses: actions/upload-artifact@v4
with:
Expand Down
18 changes: 18 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

from setuptools import Extension, setup

import sys

if sys.version_info[:2] < (3, 13):
raise RuntimeError(
"""
audioop-lts is only for python3.13+.
audioop is part of the standard library still prior to then.
If you are installing this from a system package manager
(eg. pacman, apt, dnf, zypper) please report this
to the redistribution provided by your distribution,
as they should not be redistributing it for your python version.
If you are getting this from pip installing another dependency
you should inform that dependency.
"""
)

Py_GIL_DISABLED = sysconfig.get_config_var("Py_GIL_DISABLED")
macros = []
Expand Down

0 comments on commit f57776d

Please sign in to comment.