%global srcname timeago Name: python-%{srcname} Version: 1.0.16 Release: %autorelease Summary: Simple library used to format datetime with `*** time ago` statement License: MIT URL: https://github.com/hustcc/timeago Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-pytest %description %{summary}. %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %{summary}. %prep %autosetup -n %{srcname}-%{version} # remove /usr/bin/env find . -type f -name "*.py" -exec sed -i '/^#![ ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';' %generate_buildrequires %pyproject_buildrequires -r %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{srcname} %check %pytest test/testcase.py %files -n python3-%{srcname} -f %{pyproject_files} %doc README.rst %changelog %autochangelog