Skip to content

Commit

Permalink
add rpath nonsense for mac
Browse files Browse the repository at this point in the history
  • Loading branch information
mikedh committed Jan 14, 2024
1 parent 7a20f71 commit 0362605
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2,031 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
python -m pip install cffi ruff
- name: Run Codegen
run: |
bun codegen/fetch_wgpu_bins.ts
python codegen/fetch_wgpu_bins.py
bun codegen/generate.ts
cd webgoo
python _build_ext.py
Expand All @@ -38,7 +38,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Download binaries
Expand All @@ -47,7 +47,7 @@ jobs:
python codegen/fetch_wgpu_bins.py
- uses: actions/download-artifact@v4
with:
name: codegen-python
d .. name: codegen-python
path: webgoo/
- name: Build Wheels
run: |
Expand Down
3 changes: 3 additions & 0 deletions codegen/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1312,6 +1312,9 @@ if __name__ == "__main__":
# todo : this is platform specific, we should check the extension of path_compiled
if sys.platform.startswith("linux"):
subprocess.check_call(['patchelf', "--set-rpath", "$ORIGIN", path_compiled], cwd=cwd)
elif sys.platform.startswith("darwin"):
# on mac change the @rpath to a @loader_path
subprocess.check_call(['install_name_tool', "-change", "@rpath/libwgpu_native.dylib", "@loader_path/libwgpu_native.dylib", path_compiled], cwd=cwd)
`;
Expand Down
221 changes: 0 additions & 221 deletions packaging/fetch-native.py

This file was deleted.

10 changes: 0 additions & 10 deletions packaging/wgpu_native.json

This file was deleted.

Loading

0 comments on commit 0362605

Please sign in to comment.