Skip to content

Commit 511fac2

Browse files
committed
Fix macOS builds by removing hardcoded CI paths
1 parent c7aad43 commit 511fac2

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

libs.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"system": "Darwin",
3131
"machine": "x86_64",
3232
"pointer_size": 64,
33-
"libdir": "/Users/runner/work/_temp/install/lib",
33+
"libdir": "./libmacos",
3434
"sysname": "macos",
3535
"so_name": "libcurl-impersonate.4.dylib",
3636
"so_arch": "x86_64"
@@ -39,7 +39,7 @@
3939
"system": "Darwin",
4040
"machine": "arm64",
4141
"pointer_size": 64,
42-
"libdir": "/Users/runner/work/_temp/install/lib",
42+
"libdir": "./libmacos",
4343
"sysname": "macos",
4444
"so_name": "libcurl-impersonate.4.dylib",
4545
"so_arch": "arm64"

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ environment-pass = ["LD_LIBRARY_PATH"]
118118

119119
[tool.cibuildwheel.macos]
120120
before-all = "gmake preprocess"
121+
before-build = "pip install setuptools cffi"
122+
build-frontend = "pip; args: --no-build-isolation"
121123

122124
[tool.cibuildwheel.windows]
123125
before-build = "pip install delvewheel"

scripts/build.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ def download_libcurl():
7979
for file in glob(os.path.join(arch["libdir"], "bin/*.dll")):
8080
shutil.move(file, arch["libdir"])
8181

82+
if arch["system"] == "Darwin":
83+
# Fix the install name baked into the upstream dylib so delocate can find it
84+
dylib = os.path.join(arch["libdir"], arch["so_name"])
85+
abs_dylib = os.path.abspath(dylib)
86+
os.system(f"install_name_tool -id {abs_dylib} {dylib}")
87+
8288
print("Files after unpacking")
8389
print(os.listdir(arch["libdir"]))
8490

0 commit comments

Comments
 (0)