Skip to content

Commit d722441

Browse files
committed
Added xattr fix for ci/cd
1 parent 89d879a commit d722441

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

.github/fix_macos_permisisons.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
# Name of the installed Python distribution
5+
DIST_NAME="py-capio-cl"
6+
7+
echo "🔍 Locating .so file for distribution: $DIST_NAME"
8+
9+
SO_PATH=$(python3 - << 'EOF'
10+
import importlib.metadata, pathlib
11+
12+
dist_name = "py-capio-cl" # adjust if wheel name changes
13+
dist = importlib.metadata.distribution(dist_name)
14+
15+
base = pathlib.Path(dist.locate_file(""))
16+
for f in dist.files:
17+
if pathlib.Path(f).suffix == ".so":
18+
print(base / f)
19+
break
20+
EOF
21+
)
22+
23+
echo "📍 Found .so at: $SO_PATH"
24+
echo "🔧 Clearing quarantine attributes..."
25+
xattr -rc "$SO_PATH"
26+
echo "✅ macOS socket permissions fixed."

.github/workflows/python-bindings.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ jobs:
5858
5959
pip install dist/*.whl
6060
61+
- name: "Give socket permissions (MacOS)"
62+
if: startsWith(matrix.on, 'macos-')
63+
run: |
64+
chmod +x .github/scripts/fix_macos_sockets.sh
65+
.github/scripts/fix_macos_sockets.sh
66+
67+
6168
# Run unit tests
6269
- name: "Run Python tests"
6370
run: |

0 commit comments

Comments
 (0)