Skip to content

Commit

Permalink
Bugfix/linux sdist rootless (#233)
Browse files Browse the repository at this point in the history
* Download so files to .local/lib on Linux

* Pass LD_LIBRARY_PATH to linux building containers
  • Loading branch information
perklet authored Feb 1, 2024
1 parent 1eb65b0 commit 7e868a3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ jobs:
- name: Build and test wheels
uses: pypa/[email protected]
env:
LD_LIBRARY_PATH: /home/runner/.local/lib

# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
Expand Down
2 changes: 1 addition & 1 deletion curl_cffi/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
elif uname.system == "Darwin":
libdir = "/Users/runner/work/_temp/install/lib"
else:
libdir = "/usr/local/lib"
libdir = os.path.expanduser("~/.local/lib")


ffibuilder.set_source(
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ test-skip = "pp*"
# configure cibuildwheel to build native archs ('auto'), and some emulated ones
[tool.cibuildwheel.linux]
archs = ["auto", "aarch64"]
environment = { LD_LIBRARY_PATH="$HOME/.local/lib" }
environment-pass = ["LD_LIBRARY_PATH"]


[tool.cibuildwheel.macos]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def download_so():
so_name = "libcurl-impersonate-chrome.4.dylib"
else:
sysname = "linux-gnu"
libdir = "/usr/local/lib"
libdir = os.path.expanduser("~/.local/lib")
so_name = "libcurl-impersonate-chrome.so"

if (Path(libdir) / so_name).exists():
Expand Down

0 comments on commit 7e868a3

Please sign in to comment.