pyo3/Makefile

29 lines
527 B
Makefile
Raw Normal View History

2018-11-02 21:32:18 +00:00
.PHONY: default test publish
2015-04-19 05:50:50 +00:00
2015-05-24 18:06:08 +00:00
ifndef PY
2015-06-28 19:46:24 +00:00
PY := $(word 2, $(subst ., ,$(shell python --version 2>&1)))
2015-05-24 18:06:08 +00:00
endif
2017-06-12 05:34:45 +00:00
ifeq ($(PY),2)
FEATURES := python2
endif
ifeq ($(PY),3)
FEATURES := python3
endif
CARGO_FLAGS := --features "$(FEATURES)" --no-default-features
2015-05-24 18:06:08 +00:00
2017-05-13 05:51:14 +00:00
default: test
2015-04-19 05:50:50 +00:00
2018-05-30 13:03:31 +00:00
test:
2017-05-31 04:00:22 +00:00
cargo test $(CARGO_FLAGS)
2018-10-09 16:49:54 +00:00
pip install tox
tox
2018-10-09 16:49:54 +00:00
cd examples/word-count && tox
cd examples/rustapi_module && tox
2018-11-02 21:32:18 +00:00
publish:
cargo publish --manifest-path pyo3-derive-backend/Cargo.toml
cargo publish --manifest-path pyo3cls/Cargo.toml
cargo publish