Skip to content

Commit 4e17fca

Browse files
jhonabreulclaude
andcommitted
CI: provision Python via setup-uv to fix macOS libintl load failure
actions/setup-python's x64 macOS builds dynamically link Homebrew's gettext (/usr/local/opt/gettext/lib/libintl.8.dylib). That path only exists on the Intel macos-13 image; on the Apple Silicon macos-15 runner the x64 Python binary fails to launch with "Library not loaded: libintl.8.dylib". Switch to astral-sh/setup-uv (python-build-standalone), which has no Homebrew dependency, mirroring upstream pythonnet. The python-version uses the cpython-<ver><platform-suffix> form so the right architecture build is fetched per matrix entry. Since the uv-managed venv has no seeded pip, the dependency and build steps now use `uv pip install`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent bc9f28f commit 4e17fca

1 file changed

Lines changed: 13 additions & 6 deletions

File tree

.github/workflows/main.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,27 @@ jobs:
3333
with:
3434
dotnet-version: '10.0.x'
3535

36+
# Use astral-sh/setup-uv (python-build-standalone) instead of
37+
# actions/setup-python. The setup-python x64 macOS builds dynamically
38+
# link against Homebrew's gettext (/usr/local/opt/gettext/.../libintl.8.dylib),
39+
# which is absent on the Apple Silicon macos-15 runner, so the x64 Python
40+
# binary fails to launch. python-build-standalone has no such dependency.
3641
- name: Set up Python ${{ matrix.python }}
37-
uses: actions/setup-python@v5
42+
uses: astral-sh/setup-uv@v7
3843
with:
39-
python-version: ${{ matrix.python }}
40-
architecture: ${{ matrix.platform }}
44+
python-version: cpython-${{ matrix.python }}${{ matrix.os == 'windows' && matrix.platform == 'x86' && '-windows-x86-none' || matrix.os == 'windows' && matrix.platform == 'x64' && '-windows-x86_64-none' || matrix.os == 'macos' && matrix.platform == 'x64' && '-macos-x86_64-none' || '' }}
45+
cache-python: true
46+
activate-environment: true
47+
enable-cache: true
4148

4249
- name: Install dependencies
4350
run: |
44-
pip install --upgrade -r requirements.txt
45-
pip install numpy pytz # for tests
51+
uv pip install --upgrade -r requirements.txt
52+
uv pip install numpy pytz # for tests
4653
4754
- name: Build and Install
4855
run: |
49-
pip install -v .
56+
uv pip install -v .
5057
5158
- name: Set Python DLL path and PYTHONHOME (non Windows)
5259
if: ${{ matrix.os != 'windows' }}

0 commit comments

Comments
 (0)