## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global pypi_name hf_transfer %global pypi_version 0.1.9 %global pkg_name hf-transfer Name: python-%{pkg_name} Version: %{pypi_version} Release: %autorelease Summary: Speed up file transfers with the Hugging Face Hub License: Apache-2.0 URL: https://github.com/huggingface/%{pypi_name} Source: %{pypi_source %{pypi_name}} BuildRequires: python3-devel BuildRequires: python3dist(pip) BuildRequires: python3dist(wheel) BuildRequires: python3dist(setuptools) BuildRequires: cargo-rpm-macros >= 24 BuildRequires: maturin >= 1.4 # Test requirements BuildRequires: python3-pytest %global _description %{expand: Speed up file transfers with the Hugging Face Hub.} %description %_description %package -n python3-%{pkg_name} Summary: %{summary} %description -n python3-%{pkg_name} %_description %prep %autosetup -p1 -n %{pypi_name}-%{version} sed -i -e "s|0.23|0.24|g" \ -e "s|abi3-py38|abi3-py%{python3_version_nodots}|g" \ -e "s|openssl.*|openssl = { version = \"0.10\" }|g" \ Cargo.toml %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %pyproject_wheel %cargo_license_summary %{cargo_license} > LICENSE.dependencies %install %pyproject_install %pyproject_save_files %{pypi_name} %check %pyproject_check_import # Test both the rust part of the bindings and the Python parts %cargo_test %files -n python3-%{pkg_name} -f %{pyproject_files} %license LICENSE LICENSE.dependencies %doc README.md %changelog ## START: Generated by rpmautospec * Thu May 15 2025 Yupeng Chang - 0.1.9-1 - Initial build