Skip to content
Merged
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
15 changes: 4 additions & 11 deletions .github/workflows/cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,15 @@ jobs:
strategy:
matrix:
# macos-13 was an intel runner, macos-14 is apple silicon
os: [ubuntu-22.04, windows-2022, macos-14]
os: [ubuntu-22.04, ubuntu-22.04-arm, windows-2022, windows-11-arm, macos-14]
env:
# Seems to have trouble parsing our setup.py, thus:
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.10"
# Install numpy with a wheel (do NOT compile it):
CIBW_BEFORE_BUILD: "pip install --only-binary :all: -r requirements.txt"
# There are/were no numpy wheels for these:
CIBW_SKIP: cp3*-manylinux_i686 *-musllinux_*
# configure cibuildwheel to build native arch & aarch64 too
CIBW_ARCHS_LINUX: auto aarch64
# There are/were no numpy wheels for these.
# Windows ARM64 CPython is only available from 3.11 onwards.
CIBW_SKIP: cp3*-manylinux_i686 *-musllinux_* cp310-win_arm64
# Quick test with C code using NumPy C API:
CIBW_TEST_COMMAND: "python {package}/Tests/test_Cluster.py"

Expand All @@ -28,12 +27,6 @@ jobs:
fetch-depth: 0 # Optional
submodules: true # Optional, use if you have submodules

- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v4
with:
platforms: all

- name: Checkout tag/commit
run: |
git submodule update --init biopython
Expand Down
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ numpy==1.14.5; python_version=='3.7'
numpy==1.17.3; python_version=='3.8'
numpy==1.21.0; python_version=='3.9'
numpy==1.22.3; python_version=='3.10'
numpy==1.23.3; python_version=='3.11'
numpy==1.26.1; python_version=='3.12'
# NumPy only has win_arm64 wheels from 2.3.0 onwards
numpy==1.23.3; python_version=='3.11' and (sys_platform!='win32' or platform_machine!='ARM64')
numpy==1.26.1; python_version=='3.12' and (sys_platform!='win32' or platform_machine!='ARM64')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happen on Python 3.11 or 3.12 when (sys_platform!='win32' or platform_machine!='ARM64') is false? Does that just never declare a versioned numpy dependency...

@ndabas ndabas Sep 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, correct, that does not declare a version-pinned numpy dependency, so the unpinned numpy dependency declared in biopython itself takes precedence, and we get the latest version (in most circumstances.)

I thought that was the idea here -- that we test with the 1.x series of numpy where supported. For the existing 3.13+ builds on other platforms, we just get the unpinned numpy dependency as well.

I could pin a version like 2.3.0 for the Windows ARM64 cases here, but I'm not sure if that would really add anything apart from a cluttered requirements.txt.

(Just for clarity, the way I have written the conditional expression -- (!x || !y) is equivalent to !(x && y) by De Morgan's laws. In testing I found that there is no not (expression) operator that we can use.)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd have to go hunting for the docs, but until relatively recently (in the numpy v2 era) the advice for maximising compatibility was to build against the oldest supported numpy v1 - thus these pins.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly -- that's the reason why I didn't add explicit pins for the Windows ARM64 case, because the earliest supported numpy wheels there are in the 2.x series anyway.