%global pypi_name msmart Name: python-%{pypi_name} Version: 0.1.23 Release: 1%{?dist} Summary: Python library to control Midea appliances License: MIT URL: https://github.com/mac-zhou/midea-msmart Source0: %{url}/archive/v%{version}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3dist(setuptools) %description This is a library to allow communicating to a Midea AC via the Local area network. %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} This is a library to allow communicating to a Midea AC via the Local area network. %prep %autosetup -n midea-%{pypi_name}-%{version} rm -rf %{pypi_name}.egg-info sed -i 's/\r$//' README.md %build %py3_build %install %py3_install %files -n python3-%{pypi_name} %doc README.md %license LICENSE %{_bindir}/midea-discover %{python3_sitelib}/%{pypi_name}/ %{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ %changelog * Fri Sep 18 2020 Fabian Affolter - 0.1.23-1 - Initial package for Fedora