-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
56 lines (46 loc) · 1.57 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
.PHONY: test build
#PY36_VERSION=3.6.10
PY37_VERSION=3.7.10
PY38_VERSION=3.8.8
PY39_VERSION=3.9.7
#PY3A_VERSION=3.10.0
#PY36_PATH=$(shell pyenv prefix $(PY36_VERSION))
PY37_PATH=$(shell pyenv prefix $(PY37_VERSION))
PY38_PATH=$(shell pyenv prefix $(PY38_VERSION))
PY39_PATH=$(shell pyenv prefix $(PY39_VERSION))
#PY3A_PATH=$(shell pyenv prefix $(PY3A_VERSION))
PY36_BIN=$(PY36_PATH)/bin/python
PY37_BIN=$(PY37_PATH)/bin/python
PY38_BIN=$(PY38_PATH)/bin/python
PY39_BIN=$(PY39_PATH)/bin/python
PY3A_BIN=$(PY3A_PATH)/bin/python
build:
cargo build --release
build-tiny:
RUSTFLAGS='-C link-arg=-s' cargo build --release
test:
cargo test
# for macos, do
# cp target/release/libreasonable.dylib reasonable/reasonable.so
# this test is missing brick_inference_test.n3 so it doens't work
test-python:
cargo build --lib --release --features "python-library"
cp ./target/release/libreasonable.so reasonable/reasonable.so
python test.py
install-python-versions:
# requires pyenv
#pyenv install -s $(PY36_VERSION)
pyenv install -s $(PY37_VERSION)
pyenv install -s $(PY38_VERSION)
pyenv install -s $(PY39_VERSION)
#pyenv install -s $(PY3A_VERSION)
python-build-remove:
# cargo build --lib --release -v --features python-library -Zunstable-options -- --pretty=expanded
cargo rustc --lib --release --features python-library --profile=check -- -Zunstable-options --pretty=expanded
dev-python-library:
cd python && poetry run maturin develop -b pyo3 --release
poetry run python lang.py
build-python-library:
cd python && poetry run maturin build -b pyo3
bench: build
./scripts/bench_examples.sh