Skip to content

Commit c77473a

Browse files
authored
Don't run tests on cp313t due to lack of CFFI support. (#459)
* Don't run tests on cp313t due to lack of CFFI support. * Update pyproject.toml * Bump musl version to one that hasn't been out-of-date for years. * Fix packages to accommodate musl 1.2.4 * Just don't install cryptography at all.
1 parent 9b7846c commit c77473a

File tree

4 files changed

+24
-9
lines changed

4 files changed

+24
-9
lines changed

.github/workflows/all.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,10 @@ jobs:
480480
env:
481481
GCS_ASSET_BUCKET_NAME: ${{ secrets.GCS_ASSET_BUCKET_NAME }}
482482
GCS_READER_SERVICE_ACCOUNT_KEY: ${{ secrets.GCS_READER_SERVICE_ACCOUNT_KEY }}
483-
run: python ./tests/download_test_plugins.py
483+
run: |
484+
# Inline install here on purpose, as this is only required for test _setup_ and not running
485+
pip install google-cloud-storage
486+
python ./tests/download_test_plugins.py
484487
- name: Setup audio device for testing
485488
if: runner.os == 'Linux'
486489
run: |
@@ -714,7 +717,10 @@ jobs:
714717
env:
715718
GCS_ASSET_BUCKET_NAME: ${{ secrets.GCS_ASSET_BUCKET_NAME }}
716719
GCS_READER_SERVICE_ACCOUNT_KEY: ${{ secrets.GCS_READER_SERVICE_ACCOUNT_KEY }}
717-
run: python ./tests/download_test_plugins.py
720+
run: |
721+
# Inline install here on purpose, as this is only required for test _setup_ and not running
722+
pip install google-cloud-storage
723+
python ./tests/download_test_plugins.py
718724
- name: Run tests
719725
if: matrix.os != 'ubuntu-24.04' || matrix.python-version != '3.10'
720726
run: pytest --maxfail=4 --cov-report term --cov-fail-under=${{ env.MINIMUM_COVERAGE_PERCENTAGE }} --cov=pedalboard --durations=100

pyproject.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ test-command = "pytest {project}/tests"
1010
# so we can't run post-wheel-build tests there.
1111
# The musllinux containers on aarch64 take 6+ hours to test.
1212
# Also testing any pypy versions fails, as TensorFlow isn't pypy compatible.
13-
test-skip = "*manylinux* *musllinux_aarch* *pp* *-macosx_universal2:arm64"
14-
musllinux-x86_64-image = "quay.io/pypa/musllinux_1_1_x86_64:2024-04-29-07d05a0"
15-
musllinux-aarch64-image = "quay.io/pypa/musllinux_1_1_aarch64:2024-04-29-07d05a0"
13+
# cp313t is skipped because cffi doesn't support free-threaded Python 3.13.
14+
test-skip = "*manylinux* *musllinux_aarch* *pp* *-macosx_universal2:arm64 *cp313t*"
15+
musllinux-x86_64-image = "quay.io/pypa/musllinux_1_1_x86_64:latest"
16+
musllinux-aarch64-image = "quay.io/pypa/musllinux_1_1_aarch64:latest"
1617

1718
# See: https://cibuildwheel.readthedocs.io/en/stable/options/#examples
1819
[tool.cibuildwheel.linux]

test-requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ wheel
1212
numpy>=2.1.0rc1; python_version>="3.13"
1313
numpy>=2; python_version>="3.9" and python_version<"3.13"
1414
numpy<2; python_version<="3.8"
15-
google-cloud-storage
1615
tqdm
1716
psutil
1817
mypy

tests/download_test_plugins.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,22 @@
88
import os
99
import platform
1010

11-
from google.auth.exceptions import RefreshError
12-
from google.cloud import storage
13-
from google.oauth2 import service_account
11+
try:
12+
from google.auth.exceptions import RefreshError
13+
from google.cloud import storage
14+
from google.oauth2 import service_account
15+
HAS_GCS = True
16+
except ImportError:
17+
HAS_GCS = False
18+
1419
from tqdm import tqdm
1520

1621

1722
def main():
23+
if not HAS_GCS:
24+
print("google-cloud-storage not installed. Skipping plugin download.")
25+
print("Install with: pip install google-cloud-storage")
26+
return
1827
GCS_ASSET_BUCKET_NAME = os.environ.get("GCS_ASSET_BUCKET_NAME")
1928
if not GCS_ASSET_BUCKET_NAME:
2029
print("Missing GCS_ASSET_BUCKET_NAME environment variable! Not downloading.")

0 commit comments

Comments
 (0)