[packages/python3-zeroconf] - python-zeroconf.spec updated to 0.39.4 for python 3.7+
qboosh
qboosh at pld-linux.org
Sun Mar 26 20:53:22 CEST 2023
commit b5456e65fd9912309e1b1876a91ba744326d995a
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Mar 26 20:55:31 2023 +0200
- python-zeroconf.spec updated to 0.39.4 for python 3.7+
python-zeroconf-mock.patch | 14 -----
python-zeroconf.spec | 128 ---------------------------------------------
python3-zeroconf.spec | 63 ++++++++++++++++++++++
3 files changed, 63 insertions(+), 142 deletions(-)
---
diff --git a/python-zeroconf.spec b/python-zeroconf.spec
deleted file mode 100644
index aa2c41f..0000000
--- a/python-zeroconf.spec
+++ /dev/null
@@ -1,128 +0,0 @@
-#
-# Conditional build:
-%bcond_with integration # Integration tests work in mock but fail in Koji with PermissionError
-%bcond_with tests # unit tests
-%bcond_without python2 # CPython 2.x module
-%bcond_without python3 # CPython 3.x module
-
-%define module zeroconf
-Summary: Pure Python Multicast DNS Service Discovery Library
-Summary(pl.UTF-8): Czysto pythonowa biblioteka Multicast DNS Service Discovery
-Name: python-%{module}
-# keep 0.19.x here for python2 support
-Version: 0.19.1
-Release: 1
-License: LGPL v2
-Group: Libraries/Python
-#Source0Download: https://github.com/jstasiak/python-zeroconf/releases
-Source0: https://github.com/jstasiak/python-zeroconf/archive/%{version}/%{module}-%{version}.tar.gz
-# Source0-md5: bda83913df1669610ba3c09f8133614e
-Patch0: %{name}-mock.patch
-URL: https://github.com/jstasiak/python-zeroconf
-%if %{with python2}
-BuildRequires: python-devel >= 1:2.6
-BuildRequires: python-setuptools
-%if %{with tests}
-BuildRequires: python-enum34
-BuildRequires: python-mock
-BuildRequires: python-netifaces >= 0.10.6
-BuildRequires: python-pytest
-BuildRequires: python-six
-%endif
-%endif
-%if %{with python3}
-BuildRequires: python3-devel >= 1:3.4
-BuildRequires: python3-setuptools
-%if %{with tests}
-BuildRequires: python3-netifaces >= 0.10.6
-BuildRequires: python3-pytest
-BuildRequires: python3-six
-%endif
-%endif
-BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.714
-BuildArch: noarch
-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-A pure Python implementation of multicast DNS service discovery
-supporting Bonjour/Avahi.
-
-%description -l pl.UTF-8
-Czysto pythonowa implementacja wykrywania usług multicastowych DNS
-przy użyciu Bonjour/Avahi.
-
-%package -n python3-%{module}
-Summary: Pure Python Multicast DNS Service Discovery Library
-Summary(pl.UTF-8): Czysto pythonowa biblioteka Multicast DNS Service Discovery
-Group: Libraries/Python
-
-%description -n python3-%{module}
-A pure Python implementation of multicast DNS service discovery
-supporting Bonjour/Avahi.
-
-%description -n python3-%{module} -l pl.UTF-8
-Czysto pythonowa implementacja wykrywania usług multicastowych DNS
-przy użyciu Bonjour/Avahi.
-
-%prep
-%setup -q
-%patch0 -p1
-
-# Remove enum-compat from install_requires
-# See https://bugzilla.redhat.com/show_bug.cgi?id=1432165
-sed -i '/enum-compat/d' setup.py
-
-%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-%{__python} -m pytest \
- %{!?with_integration:-k "not integration"}
-%endif
-%endif
-
-%if %{with python3}
-%py3_build
-
-%if %{with tests}
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-%{__python3} -m pytest \
- %{!?with_integration:-k "not integration"}
-%endif
-%endif
-
-%install
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%py_install
-
-%py_postclean
-%endif
-
-%if %{with python3}
-%py3_install
-%endif
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%files
-%defattr(644,root,root,755)
-%doc README.rst
-%{py_sitescriptdir}/zeroconf.py[co]
-%{py_sitescriptdir}/zeroconf-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-%{module}
-%defattr(644,root,root,755)
-%doc README.rst
-%{py3_sitescriptdir}/__pycache__/zeroconf.cpython-*.py[co]
-%{py3_sitescriptdir}/zeroconf.py
-%{py3_sitescriptdir}/zeroconf-%{version}-py*.egg-info
-%endif
diff --git a/python3-zeroconf.spec b/python3-zeroconf.spec
new file mode 100644
index 0000000..62ea679
--- /dev/null
+++ b/python3-zeroconf.spec
@@ -0,0 +1,63 @@
+#
+# Conditional build:
+%bcond_with integration # Integration tests work in mock but fail in Koji with PermissionError
+%bcond_with tests # unit tests
+
+%define module zeroconf
+Summary: Pure Python Multicast DNS Service Discovery Library
+Summary(pl.UTF-8): Czysto pythonowa biblioteka Multicast DNS Service Discovery
+Name: python3-%{module}
+# 0.40+ uses poetry to build
+Version: 0.39.4
+Release: 1
+License: LGPL v2
+Group: Libraries/Python
+#Source0Download: https://github.com/jstasiak/python-zeroconf/releases
+Source0: https://github.com/jstasiak/python-zeroconf/archive/%{version}/python-%{module}-%{version}.tar.gz
+# Source0-md5: b37ccfaff57368f6fc079676f904c834
+URL: https://github.com/jstasiak/python-zeroconf
+BuildRequires: python3-devel >= 1:3.7
+BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-async_timeout >= 4.0.1
+BuildRequires: python3-ifaddr >= 0.1.7
+BuildRequires: python3-pytest
+%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+A pure Python implementation of multicast DNS service discovery
+supporting Bonjour/Avahi.
+
+%description -l pl.UTF-8
+Czysto pythonowa implementacja wykrywania usług multicastowych DNS
+przy użyciu Bonjour/Avahi.
+
+%prep
+%setup -q -n python-%{module}-%{version}
+
+%build
+%py3_build
+
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python3} -m pytest \
+ %{!?with_integration:-k "not integration"}
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README.rst
+%{py3_sitescriptdir}/zeroconf
+%{py3_sitescriptdir}/zeroconf-%{version}-py*.egg-info
diff --git a/python-zeroconf-mock.patch b/python-zeroconf-mock.patch
deleted file mode 100644
index dcfc402..0000000
--- a/python-zeroconf-mock.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- python-zeroconf-0.19.1/test_zeroconf.py.orig 2017-06-13 08:34:17.000000000 +0200
-+++ python-zeroconf-0.19.1/test_zeroconf.py 2023-03-26 17:55:15.249452986 +0200
-@@ -272,7 +272,10 @@ class Names(unittest.TestCase):
- assert longest_packet[0] >= r._MAX_MSG_ABSOLUTE - 100
-
- # mock zeroconf's logger warning() and debug()
-- from mock import patch
-+ try:
-+ from mock import patch
-+ except ImportError:
-+ from unittest.mock import patch
- patch_warn = patch('zeroconf.log.warning')
- patch_debug = patch('zeroconf.log.debug')
- mocked_log_warn = patch_warn.start()
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-zeroconf.git/commitdiff/b5456e65fd9912309e1b1876a91ba744326d995a
More information about the pld-cvs-commit
mailing list