2020-06-05 11:51:15 +00:00
|
|
|
.PHONY: test test_py publish clippy lint fmt
|
2019-08-17 12:10:35 +00:00
|
|
|
|
2020-01-12 00:43:33 +00:00
|
|
|
# Constant used in clippy target
|
2019-08-17 12:10:35 +00:00
|
|
|
CLIPPY_LINTS_TO_DENY := warnings
|
2015-04-19 05:50:50 +00:00
|
|
|
|
2020-06-05 11:51:15 +00:00
|
|
|
test: lint test_py
|
2018-11-15 20:28:28 +00:00
|
|
|
cargo test
|
2019-02-01 15:31:18 +00:00
|
|
|
|
2020-06-05 11:51:15 +00:00
|
|
|
test_py:
|
|
|
|
tox -e py
|
|
|
|
for example in examples/*; do tox -e py -c $$example/tox.ini || exit 1; done
|
2018-11-02 21:32:18 +00:00
|
|
|
|
2019-08-17 12:10:35 +00:00
|
|
|
fmt:
|
|
|
|
cargo fmt --all -- --check
|
2019-09-05 23:16:09 +00:00
|
|
|
black . --check
|
2019-08-17 12:10:35 +00:00
|
|
|
|
|
|
|
clippy:
|
|
|
|
@touch src/lib.rs # Touching file to ensure that cargo clippy will re-check the project
|
2020-06-21 07:09:50 +00:00
|
|
|
cargo clippy --features="default num-bigint num-complex" --tests -- \
|
2020-01-12 00:43:33 +00:00
|
|
|
$(addprefix -D ,${CLIPPY_LINTS_TO_DENY})
|
2020-06-05 11:51:51 +00:00
|
|
|
for example in examples/*; do (cd $$example/; cargo clippy) || exit 1; done
|
2019-08-17 12:10:35 +00:00
|
|
|
|
|
|
|
lint: fmt clippy
|
|
|
|
@true
|
|
|
|
|
2019-02-10 18:40:04 +00:00
|
|
|
publish: test
|
2018-11-02 21:32:18 +00:00
|
|
|
cargo publish --manifest-path pyo3-derive-backend/Cargo.toml
|
|
|
|
cargo publish --manifest-path pyo3cls/Cargo.toml
|
|
|
|
cargo publish
|