diff --git a/cargo_config b/cargo_config index e1096ed..f27f832 100644 --- a/cargo_config +++ b/cargo_config @@ -1,3 +1,4 @@ + [source.crates-io] replace-with = "vendored-sources" diff --git a/python-libcst.spec b/python-libcst.spec index d3b20b5..f2e1ad2 100644 --- a/python-libcst.spec +++ b/python-libcst.spec @@ -75,7 +75,8 @@ A concrete syntax tree with AST-like properties for Python 3.5+ programs. %prep %setup -q -n libcst-%{version} tar x -C native/ -f %{SOURCE1} -(cd native ; mkdir -p .cargo ; cat %{SOURCE2} >>.cargo/config.toml) +mkdir -p .cargo && cat %{SOURCE2} >>.cargo/config.toml +(cd native && mkdir -p .cargo && cat %{SOURCE2} >>.cargo/config.toml) %autopatch -p1 # wrong executable call when outside of venv (gh#Instagram/LibCST#468) @@ -98,6 +99,7 @@ cd native } cd .. export CARGO_NET_OFFLINE=true PROFILE=release +cargo metadata --offline --manifest-path native/libcst/Cargo.toml --format-version 1 %python_build %endif