From fec49995726e5404f81769a5e229bdca2ed28909 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Sun, 14 Apr 2024 05:27:49 +0000 Subject: automatic import of python-tokenizers --- python-tokenizers.spec | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'python-tokenizers.spec') diff --git a/python-tokenizers.spec b/python-tokenizers.spec index b37bce0..a356bee 100644 --- a/python-tokenizers.spec +++ b/python-tokenizers.spec @@ -36,6 +36,17 @@ Summary: %{pkg_summary} %{pkg_description} %prep +# 设置 cargo 镜像源 +mkdir -vp ${CARGO_HOME:-$HOME/.cargo} + +cat << EOF | tee -a ${CARGO_HOME:-$HOME/.cargo}/config +[source.crates-io] +replace-with = 'mirror' + +[source.mirror] +registry = "https://mirrors.tuna.tsinghua.edu.cn/git/crates.io-index.git" +EOF + %autosetup -p1 -n %{pypi_name}-%{pypi_version} %build -- cgit v1.2.3