Skip to content

Commit

Permalink
Fix pip install maturin on OpenBSD 6.8
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Nov 23, 2021
1 parent be4578c commit 9f227af
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ def run(self):
raise RuntimeError("build maturin failed:\n" + exc.output.decode())
print(metadata)
assert metadata["target"]["name"] == "maturin"
source = metadata["filenames"][0]
filenames = metadata["filenames"]
# somehow on openbsd `filenames` is empty but we can use the
# `executable` instead, see https://github.com/PyO3/maturin/issues/481
source = filenames[0] if filenames else metadata["executable"]

# run this after trying to build with cargo (as otherwise this leaves
# venv in a bad state: https://github.com/benfred/py-spy/issues/69)
Expand Down

0 comments on commit 9f227af

Please sign in to comment.