Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build issues due to maturin & py03 versions #37

Merged
merged 3 commits into from
Jan 3, 2022

Conversation

orieg
Copy link
Contributor

@orieg orieg commented Nov 21, 2021

This PR bump maturin and py03 versions to latests. It also update the Makefile to properly run make test on MacOS.

This should fix #33

Note that to successfully build on a MacOS M1, you may need the following rustflags defined in ~/.cargo/config

[target.aarch64-apple-darwin]
rustflags = [
  "-C", "link-arg=-undefined",
  "-C", "link-arg=dynamic_lookup",
]

Output from make test:

$> make test
cp target/debug/libtantivy.dylib tantivy/tantivy.so
python3 -m pytest
================================= test session starts ==================================
platform darwin -- Python 3.9.7, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /Users/nicolas/Documents/git/tantivy-py
collected 21 items                                                                     

tests/tantivy_test.py .....................                                      [100%]

================================== 21 passed in 3.37s ==================================

@kapilt
Copy link
Contributor

kapilt commented Dec 21, 2021

thanks, this did the trick for me, also fwiw, afaics a rustup install doesn't need the cargo config, but a brew install rust does.

[update] never mind I did need the cargo config to get things working.

[update 2] the set of workarounds for building without the cargo config changes is documented here https://pyo3.rs/master/building_and_distribution.html#macos

@fulmicoton
Copy link
Contributor

Thank you @orieg !

@fulmicoton fulmicoton merged commit eba3f60 into quickwit-oss:master Jan 3, 2022
Sidhant29 pushed a commit to Sidhant29/tantivy-py that referenced this pull request Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build fails on Windows
3 participants