Skip to content

Conversation

@amoeba
Copy link
Member

@amoeba amoeba commented Nov 5, 2025

Prior to this change, wheel verification would fail on macOS because DYLD_LIBRARY_PATH wasn't been passed down to pytest in ci/scripts/python_util.sh. Here, DYLD_LIBRARY_PATH is used in the tests to specify the location of driver to test so when it's not set, the test fails to find the driver. Presumably this doesn't fail elsewhere because we invoke the tests differently elsewhere.

This ultimately due to System Integrity Protection (SIP) on macOS and that env is /usr/bin/env which is a "restricted" binary. Restricted means environment variables like DYLD_LIBRARY_PATH get stripped from child processes.

This is a simple test that shows how this fails:

$ echo $DYLD_LIBRARY_PATH
XXX

~/tmp/arrow-adbc-tmpdir/venv-wheel-3.10-arm64/bin
$ ./python -c "import os; print(os.environ['DYLD_LIBRARY_PATH'])"
XXX

~/tmp/arrow-adbc-tmpdir/venv-wheel-3.10-arm64/bin
$ env FOO=bar ./python -c "import os; print(os.environ['DYLD_LIBRARY_PATH'])"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/bryce/.local/share/uv/python/cpython-3.10.19-macos-aarch64-none/lib/python3.10/os.py", line 680, in __getitem__
    raise KeyError(key) from None
KeyError: 'DYLD_LIBRARY_PATH'

@amoeba amoeba requested review from kou and lidavidm as code owners November 5, 2025 01:45
@github-actions github-actions bot added this to the ADBC Libraries 21 milestone Nov 5, 2025
@amoeba amoeba changed the title dev(release): fix wheel verification failure on macOS due to SIP fix(dev/release): fix wheel verification failure on macOS due to SIP Nov 5, 2025
@amoeba amoeba force-pushed the fix/dev-release-macos-wheel-test branch from e69ac0f to 11555f2 Compare November 5, 2025 01:51
@lidavidm lidavidm merged commit 12deb28 into apache:main Nov 5, 2025
66 of 71 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants