%global pypi_name pyotgw %global upstream_version 0.6b0 Name: python-%{pypi_name} Version: 0.6 Release: 0.b%{?dist} Summary: Python library to interface with the OpenTherm Gateway License: GPLv2+ URL: https://github.com/mvn23/pyotgw Source0: %{url}/archive/%{upstream_version}/%{pypi_name}-%{upstream_version}.tar.gz BuildArch: noarch %description A Python library to interface with the OpenTherm Gateway. %package -n python3-%{pypi_name} Summary: %{summary} BuildRequires: python3-devel BuildRequires: python3dist(setuptools) %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} A Python library to interface with the OpenTherm Gateway %prep %autosetup -n %{pypi_name}-%{upstream_version} rm -rf %{pypi_name}.egg-info %build %py3_build %install %py3_install %files -n python3-%{pypi_name} %license LICENSE %doc README.md %{python3_sitelib}/%{pypi_name}/ %{python3_sitelib}/%{pypi_name}-%{upstream_version}-py%{python3_version}.egg-info/ %changelog * Fri Sep 18 2020 Fabian Affolter - 0.6-0.b - Initial package for Fedora