tantivy-py/Makefile
Nicolas Brousse eba3f60346
Fix build issues due to maturin & py03 versions (#37)
* bump maturin and pyo3 versions

* update to support MacOS dylib extentions

* update package config to use a build.rs and fix  linking issue on macOS see  https://pyo3.rs/master/building_and_distribution.html#macos
2022-01-03 22:50:19 +09:00

24 lines
402 B
Makefile

ifeq ($(shell UNAME),Darwin)
EXT := dylib
else
EXT := so
endif
source_files := $(wildcard src/*.rs)
all: tantivy/tantivy.$(EXT)
PHONY: test format
test: tantivy/tantivy.$(EXT)
python3 -m pytest
format:
rustfmt src/*.rs
tantivy/tantivy.$(EXT): target/debug/libtantivy.$(EXT)
cp target/debug/libtantivy.$(EXT) tantivy/tantivy.so
target/debug/libtantivy.$(EXT): $(source_files)
cargo build