Make `test-python` Make-target work on Linux (#51)

This commit is contained in:
Michael Partheil 2023-12-01 17:20:37 +01:00 committed by GitHub
parent ae858ead5c
commit 8a606b9460
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -1,4 +1,10 @@
ifeq ($(shell uname), Darwin)
PY_EXT := dylib
else
PY_EXT := so
endif
test-python:
cargo build --release
cp target/release/libinstant_segment.dylib instant-segment-py/test/instant_segment.so
cp target/release/libinstant_segment.$(PY_EXT) instant-segment-py/test/instant_segment.so
PYTHONPATH=instant-segment-py/test/ python3 -m test