forked from PyO3/pyo3
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (26 loc) · 817 Bytes
/
Copy pathMakefile
File metadata and controls
33 lines (26 loc) · 817 Bytes
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
.PHONY: test test_py3 publish clippy lint fmt
# Constants used in clippy target
CLIPPY_LINTS_TO_DENY := warnings
CLIPPY_LINTS_TO_ALLOW := clippy::new_ret_no_self
test:
cargo test
${MAKE} clippy
tox
for example in examples/*; do tox -e py -c $$example/tox.ini; done
test_py3:
tox -e py3
for example in examples/*; do tox -e py3 -c $$example/tox.ini; done
fmt:
cargo fmt --all -- --check
black . --check
clippy:
@touch src/lib.rs # Touching file to ensure that cargo clippy will re-check the project
cargo clippy --all-features --all-targets -- \
$(addprefix -D ,${CLIPPY_LINTS_TO_DENY}) \
$(addprefix -A ,${CLIPPY_LINTS_TO_ALLOW})
lint: fmt clippy
@true
publish: test
cargo publish --manifest-path pyo3-derive-backend/Cargo.toml
cargo publish --manifest-path pyo3cls/Cargo.toml
cargo publish