[packages/python3-dns] - added no-wheel patch (disable wheel dependency), run tests
qboosh
qboosh at pld-linux.org
Sun Mar 13 21:37:33 CET 2022
commit b9340c281acead3d779a204d88872deb68a33423
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Mar 13 21:39:39 2022 +0100
- added no-wheel patch (disable wheel dependency), run tests
python3-dns-no-wheel.patch | 11 +++++++++++
python3-dns.spec | 26 +++++++++++++++++++++-----
2 files changed, 32 insertions(+), 5 deletions(-)
---
diff --git a/python3-dns.spec b/python3-dns.spec
index 37ce919..439f5f5 100644
--- a/python3-dns.spec
+++ b/python3-dns.spec
@@ -1,3 +1,7 @@
+#
+# Conditional build:
+%bcond_without tests # unit tests
+
%define module dns
Summary: dnspython - a DNS toolkit for Python 3
Summary(pl.UTF-8): dnspython - zestaw narzędzi do DNS dla Pythona 3
@@ -6,12 +10,18 @@ Version: 2.2.0
Release: 1
License: MIT
Group: Development/Languages/Python
-Source0: https://pypi.debian.net/dnspython/dnspython-%{version}.tar.gz
+Source0: https://files.pythonhosted.org/packages/source/d/dnspython/dnspython-%{version}.tar.gz
# Source0-md5: 6a247a755f7676f115c0e555842550d5
-URL: http://www.dnspython.org/
-BuildRequires: python3-devel >= 1:3.3
-BuildRequires: python3-setuptools
-BuildRequires: python3-wheel
+Patch0: %{name}-no-wheel.patch
+URL: https://www.dnspython.org/
+BuildRequires: python3-devel >= 1:3.6
+BuildRequires: python3-setuptools >= 1:44
+BuildRequires: python3-setuptools_scm >= 3.4.3
+BuildRequires: python3-toml
+%if %{with tests}
+BuildRequires: python3-pytest >= 5.4.1
+# < 7 according to pyproject.toml
+%endif
BuildRequires: rpmbuild(macros) >= 1.714
BuildRequires: rpm-pythonprov
Requires: python3-modules >= 1:3.6
@@ -42,10 +52,16 @@ komunikatach, nazwach i rekordach w DNS-ie.
%prep
%setup -q -n dnspython-%{version}
+%patch0 -p1
%build
%py3_build
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python3} -m pytest tests
+%endif
+
%install
rm -rf $RPM_BUILD_ROOT
diff --git a/python3-dns-no-wheel.patch b/python3-dns-no-wheel.patch
new file mode 100644
index 0000000..c3eabb2
--- /dev/null
+++ b/python3-dns-no-wheel.patch
@@ -0,0 +1,11 @@
+--- dnspython-2.2.0/setup.cfg.orig 2022-01-18 14:24:20.406987700 +0100
++++ dnspython-2.2.0/setup.cfg 2022-03-05 08:21:35.339056016 +0100
+@@ -42,7 +42,7 @@ packages =
+ dns.rdtypes.CH
+ python_requires = >=3.6
+ test_suite = tests
+-setup_requires = setuptools>=44; wheel; setuptools_scm[toml]>=3.4.3
++setup_requires = setuptools>=44; setuptools_scm[toml]>=3.4.3
+
+ [options.extras_require]
+ DOH = httpx>=0.21.1; h2>=4.1.0; requests; requests-toolbelt
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-dns.git/commitdiff/b9340c281acead3d779a204d88872deb68a33423
More information about the pld-cvs-commit
mailing list