f80e183
%global pypi_name aiolifx
f80e183
f80e183
Name:           python-%{pypi_name}
f80e183
Version:        0.6.8
f80e183
Release:        1%{?dist}
f80e183
Summary:        Python API for local communication with LIFX devices
f80e183
f80e183
License:        MIT
f80e183
URL:            http://github.com/frawau/aiolifx
f80e183
Source0:        %{pypi_source}
f80e183
BuildArch:      noarch
f80e183
f80e183
%description
f80e183
aiolifx is a Python library to control Lifx LED light bulbs 
f80e183
over your LAN.
f80e183
f80e183
%package -n     python3-%{pypi_name}
f80e183
Summary:        %{summary}
f80e183
f80e183
BuildRequires:  python3-devel
f80e183
BuildRequires:  python3dist(setuptools)
f80e183
%{?python_provide:%python_provide python3-%{pypi_name}}
f80e183
f80e183
%description -n python3-%{pypi_name}
f80e183
aiolifx is a Python library to control Lifx LED light bulbs 
f80e183
over your LAN.
f80e183
f80e183
%prep
f80e183
%autosetup -n %{pypi_name}-%{version}
f80e183
rm -rf %{pypi_name}.egg-info
f80e183
# https://github.com/frawau/aiolifx/pull/37
f80e183
sed -i -e '/^#!\//, 1d' aiolifx/{__main__.py,aiolifx.py,update-products.py}
f80e183
# Remove script to maintain parts of the source
f80e183
rm -rf aiolifx/update-products.py
f80e183
f80e183
%build
f80e183
%py3_build
f80e183
f80e183
%install
f80e183
%py3_install
f80e183
f80e183
%files -n python3-%{pypi_name}
f80e183
%license LICENSE.txt
f80e183
%doc README.md
f80e183
%{python3_sitelib}/%{pypi_name}/
f80e183
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/
f80e183
f80e183
%changelog
f80e183
* Mon Aug 24 2020 Fabian Affolter <mail@fabian-affolter.ch> - 0.6.8-1
f80e183
- Initial package for Fedora