Specify default-features = false for proc-macro related ctates

This commit is contained in:
kngwyu 2020-03-16 19:43:19 +09:00
parent 3f030d46fd
commit 8480396a22
3 changed files with 12 additions and 5 deletions

View file

@ -4,7 +4,8 @@ set -e
### Setup Rust toolchain ####################################################### ### Setup Rust toolchain #######################################################
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain=$TRAVIS_RUST_VERSION # Use profile=minimal here to skip installing clippy
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=$TRAVIS_RUST_VERSION --profile=minimal -y
export PATH=$PATH:$HOME/.cargo/bin export PATH=$PATH:$HOME/.cargo/bin
if [ "$TRAVIS_JOB_NAME" = "Minimum nightly" ]; then if [ "$TRAVIS_JOB_NAME" = "Minimum nightly" ]; then
rustup component add clippy rustup component add clippy

View file

@ -10,7 +10,14 @@ categories = ["api-bindings", "development-tools::ffi"]
license = "Apache-2.0" license = "Apache-2.0"
edition = "2018" edition = "2018"
# Note: we use default-features = false for proc-macro related crates
# not to depend on proc-macro itself.
# See https://github.com/PyO3/pyo3/pull/810 for more.
[dependencies] [dependencies]
quote = "1" quote = { version = "1", default-features = false }
proc-macro2 = "1" proc-macro2 = { version = "1", default-features = false }
syn = { version = "1", features = ["full", "extra-traits"] }
[dependencies.syn]
version = "1"
default-features = false
features = ["derive", "parsing", "printing", "clone-impls", "full", "extra-traits"]

View file

@ -15,6 +15,5 @@ proc-macro = true
[dependencies] [dependencies]
quote = "1" quote = "1"
proc-macro2 = "1"
syn = { version = "1", features = ["full", "extra-traits"] } syn = { version = "1", features = ["full", "extra-traits"] }
pyo3-derive-backend = { path = "../pyo3-derive-backend", version = "=0.9.0-alpha.1" } pyo3-derive-backend = { path = "../pyo3-derive-backend", version = "=0.9.0-alpha.1" }