%global srcname garth # Tests require Internet access %bcond_with tests Name: python-%{srcname} Version: 0.4.46 Release: %autorelease Summary: Garmin SSO auth + Connect client License: MIT URL: https://pypi.org/project/garth/ Source: %{pypi_source %{srcname}} BuildArch: noarch BuildRequires: python3-devel %global _description %{expand: Garmin SSO auth + Connect Python client.} %description %_description %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %_description %prep %autosetup -p1 -n %{srcname}-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{srcname} %check %if %{with tests} %pytest %else %pyproject_check_import %endif %files -n python3-%{srcname} -f %{pyproject_files} %doc README.md %changelog %autochangelog