Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > a3ff41911e508dc3c457197c4f8e7b56 > files > 1

python-soco-0.29.1-1.mga9.src.rpm

%define ghname SoCo
%define srcname soco

Name:           python-soco
Version:        0.29.1
Release:        %mkrel 1
Summary:        Python library to control Sonos speakers

Group:	Development/Python
License:        MIT
URL:            https://python-soco.com
Source0:		https://github.com/%{ghname}/%{ghname}/archive/refs/tags/v%{version}.tar.gz
BuildArch:      noarch

BuildRequires:  python%{python3_pkgversion}-devel
BuildRequires:  python3dist(appdirs)
BuildRequires:  python3dist(ifaddr)
BuildRequires:  python3dist(lxml)
BuildRequires:  python3dist(mock)
BuildRequires:  python3dist(pytest)
BuildRequires:  python3dist(requests)
BuildRequires:  python3dist(requests-mock)
BuildRequires:  python3dist(setuptools)
BuildRequires:  python3dist(xmltodict)


#XXX: see https://src.fedoraproject.org/rpms/python-soco/blob/f34/f/python-soco.spec
#BuildRequires:  python3-devel
#BuildRequires:  python3dist(graphviz)
#BuildRequires:  python3dist(pytest-cov)
#BuildRequires:  python3dist(wheel)

%description
SoCo (Sonos Controller) is a Python project that allows you to programmatically
control Sonos speakers.

%package -n python%{python3_pkgversion}-%{srcname}
Summary:        %{summary}
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
Requires:   python%{python3_pkgversion}-future

%description -n python%{python3_pkgversion}-%{srcname}
SoCo (Sonos Controller) is a Python project that allows you to programmatically
control Sonos speakers.

%prep
%autosetup -n %{ghname}-%{version}

rm -rf %{srcname}.egg-info
rm -rf examples/webapp/.gitignore
sed -i -e '/^#!\//, 1d' {examples/plugins/socoplugins.py,examples/commandline/tunein.py}

%build
%py3_build

#PYTHONPATH=${PWD} sphinx-build-3 doc html
#rm -rf html/.{doctrees,buildinfo}

%install
%py3_install

%check
%pytest -v tests

%files -n python%{python3_pkgversion}-%{srcname}
%license LICENSE.rst
%doc examples/ README.rst
%{python3_sitelib}/*


%changelog
* Mon Jun 26 2023 rapsys <rapsys> 0.29.1-1.mga9
+ Revision: 1963066
- Add lxml buildrequires
- Add ifaddr buildrequires
- Add pytest buildrequires
- Import python-soco 0.29.1
- Created package structure for python-soco.