# Generated by rust2rpm 27 %bcond check 1 %global debug_package %{nil} %global crate hf-hub Name: rust-hf-hub Version: 0.4.3 Release: %autorelease Summary: A limited re-implementation of the huggingface_hub python package in Rust License: Apache-2.0 URL: https://crates.io/crates/hf-hub Source: %{crates_source} # Automatically generated patch to strip dependencies and normalize metadata Patch: hf-hub-fix-metadata-auto.diff # Manually created patch for downstream crate metadata changes Patch: hf-hub-fix-metadata.diff BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: This crates aims ease the interaction with [huggingface](https://huggingface.co/) It aims to be compatible with [huggingface_hub](https://github.com/huggingface/huggingface_hub/) python package, but only implements a smaller subset of functions.} %description %{_description} %package devel Summary: %{summary} BuildArch: noarch %description devel %{_description} This package contains library source intended for building other packages which use the "%{crate}" crate. %files devel %license %{crate_instdir}/LICENSE %doc %{crate_instdir}/README.md %{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+default-devel %{_description} This package contains library source intended for building other packages which use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+default-tls-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+default-tls-devel %{_description} This package contains library source intended for building other packages which use the "default-tls" feature of the "%{crate}" crate. %files -n %{name}+default-tls-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+native-tls-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+native-tls-devel %{_description} This package contains library source intended for building other packages which use the "native-tls" feature of the "%{crate}" crate. %files -n %{name}+native-tls-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+rustls-tls-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+rustls-tls-devel %{_description} This package contains library source intended for building other packages which use the "rustls-tls" feature of the "%{crate}" crate. %files -n %{name}+rustls-tls-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+tokio-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+tokio-devel %{_description} This package contains library source intended for building other packages which use the "tokio" feature of the "%{crate}" crate. %files -n %{name}+tokio-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+ureq-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+ureq-devel %{_description} This package contains library source intended for building other packages which use the "ureq" feature of the "%{crate}" crate. %files -n %{name}+ureq-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install %if %{with check} %check # * skip tests that need a network connection # * skip doctest that needs a network connection %cargo_test -- --doc -- --skip 34 %{cargo_test -- --lib -- --exact %{shrink: --skip api::sync::tests::dataset --skip api::sync::tests::detailed_info --skip api::sync::tests::info --skip api::sync::tests::locking --skip api::sync::tests::models --skip api::sync::tests::resume --skip api::sync::tests::simple --skip api::sync::tests::simple_with_retries --skip api::tokio::tests::dataset --skip api::tokio::tests::info --skip api::tokio::tests::info_request --skip api::tokio::tests::locking --skip api::tokio::tests::models --skip api::tokio::tests::repo_info_failed --skip api::tokio::tests::resume --skip api::tokio::tests::revision --skip api::tokio::tests::simple }} %endif %changelog %autochangelog