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#macosmaster
parent
df205492b4
commit
eba3f60346
|
@ -10,6 +10,9 @@ license = "MIT"
|
|||
name = "tantivy"
|
||||
crate-type = ["cdylib"]
|
||||
|
||||
[build-dependencies]
|
||||
pyo3-build-config = "0.15.1"
|
||||
|
||||
[dependencies]
|
||||
chrono = "0.4.19"
|
||||
tantivy = "0.13.2"
|
||||
|
@ -17,7 +20,7 @@ itertools = "0.9.0"
|
|||
futures = "0.3.5"
|
||||
|
||||
[dependencies.pyo3]
|
||||
version = "0.13.2"
|
||||
version = "0.14.5"
|
||||
features = ["extension-module"]
|
||||
|
||||
[package.metadata.maturin]
|
||||
|
|
16
Makefile
16
Makefile
|
@ -1,17 +1,23 @@
|
|||
ifeq ($(shell UNAME),Darwin)
|
||||
EXT := dylib
|
||||
else
|
||||
EXT := so
|
||||
endif
|
||||
|
||||
source_files := $(wildcard src/*.rs)
|
||||
|
||||
all: tantivy/tantivy.so
|
||||
all: tantivy/tantivy.$(EXT)
|
||||
|
||||
PHONY: test format
|
||||
|
||||
test: tantivy/tantivy.so
|
||||
test: tantivy/tantivy.$(EXT)
|
||||
python3 -m pytest
|
||||
|
||||
format:
|
||||
rustfmt src/*.rs
|
||||
|
||||
tantivy/tantivy.so: target/debug/libtantivy.so
|
||||
cp target/debug/libtantivy.so tantivy/tantivy.so
|
||||
tantivy/tantivy.$(EXT): target/debug/libtantivy.$(EXT)
|
||||
cp target/debug/libtantivy.$(EXT) tantivy/tantivy.so
|
||||
|
||||
target/debug/libtantivy.so: $(source_files)
|
||||
target/debug/libtantivy.$(EXT): $(source_files)
|
||||
cargo build
|
||||
|
|
2
Pipfile
2
Pipfile
|
@ -4,7 +4,7 @@ url = "https://pypi.org/simple"
|
|||
verify_ssl = true
|
||||
|
||||
[dev-packages]
|
||||
maturin = ">=0.7.7"
|
||||
maturin = ">=0.12.0"
|
||||
pytest = ">=4.0"
|
||||
e1839a8 = {path = "."}
|
||||
|
||||
|
|
Loading…
Reference in New Issue