58e4ea5
Name:           python-zeroconf
c26c70d
Version:        0.118.0
5f6b7ac
Release:        %autorelease
3d9b0cf
Summary:        Pure Python Multicast DNS Service Discovery Library
3d9b0cf
8915076
License:        LGPL-2.1-or-later
8d6e4cf
URL:            https://github.com/jstasiak/python-zeroconf
58e4ea5
Source0:        %{url}/archive/%{version}/zeroconf-%{version}.tar.gz
267dd2e
4b20c38
BuildRequires:  gcc
3d9b0cf
BuildRequires:  python3-devel
3d9b0cf
BuildRequires:  python3-pytest
cee5000
BuildRequires:  python3-pytest-asyncio
3d9b0cf
242a61f
3d9b0cf
%description
3d9b0cf
A pure Python implementation of multicast DNS service discovery
3d9b0cf
supporting Bonjour/Avahi.
3d9b0cf
58e4ea5
%package -n     python3-zeroconf
8d6e4cf
Summary:        %{summary}
3d9b0cf
58e4ea5
%description -n python3-zeroconf
51095a8
A pure Python 3 implementation of multicast DNS service discovery
3d9b0cf
supporting Bonjour/Avahi.
3d9b0cf
3a2abc5
3d9b0cf
%prep
9ee786f
%autosetup -p1
14eb7d1
# Upstream requires this for https://github.com/python-poetry/poetry/issues/7505
14eb7d1
# But it's not relevant for the RPM package
14eb7d1
sed -i 's/poetry-core>=1.5.2/poetry-core/' pyproject.toml
14eb7d1
# We don't measure coverage in tests
14eb7d1
sed -Ei 's/--cov(-|=)[^ "]+//g' pyproject.toml
8d6e4cf
3d9b0cf
3a2abc5
%generate_buildrequires
3a2abc5
%pyproject_buildrequires
3a2abc5
3a2abc5
3d9b0cf
%build
4b20c38
# Explicitly choose to compile the Cython extensions
4b20c38
export REQUIRE_CYTHON=1
3a2abc5
%pyproject_wheel
3d9b0cf
3d9b0cf
3d9b0cf
%install
3a2abc5
%pyproject_install
3a2abc5
%pyproject_save_files zeroconf
3d9b0cf
3d9b0cf
3d9b0cf
%check
cee5000
# IPv6 tests fail in Koji/mock, test_sending_unicast uses IPv6
4557369
%pytest -v -k "not test_sending_unicast and not test_integration_with_listener_ipv6"
3d9b0cf
3d9b0cf
58e4ea5
%files -n python3-zeroconf -f %{pyproject_files}
3d9b0cf
%doc README.rst
3d9b0cf
3d9b0cf
3d9b0cf
%changelog
5f6b7ac
%autochangelog