diff --git a/_multibuild b/_multibuild
new file mode 100644
index 0000000..49fb912
--- /dev/null
+++ b/_multibuild
@@ -0,0 +1,3 @@
+
+ test
+
diff --git a/python-dnspython.changes b/python-dnspython.changes
index fe1897f..eff4685 100644
--- a/python-dnspython.changes
+++ b/python-dnspython.changes
@@ -1,3 +1,10 @@
+-------------------------------------------------------------------
+Wed Feb 2 18:24:23 UTC 2022 - Ben Greiner
+
+- Break build dependency cycle through :test multibuild
+- PEP517 style: poetry-core is enough to build the package
+- Clean up old python36 requirements: no longer in Tumbleweed
+
-------------------------------------------------------------------
Wed Jan 19 12:28:45 UTC 2022 - Sebastian Wagner
diff --git a/python-dnspython.spec b/python-dnspython.spec
index 34a2735..6ca5329 100644
--- a/python-dnspython.spec
+++ b/python-dnspython.spec
@@ -1,5 +1,5 @@
#
-# spec file for package python-dnspython
+# spec file
#
# Copyright (c) 2022 SUSE LLC
#
@@ -16,9 +16,18 @@
#
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%global flavor @BUILD_FLAVOR@%{nil}
+%if "%{flavor}" == "test"
+%define psuffix -test
+%bcond_without test
+%else
+%define psuffix %{nil}
+%bcond_with test
+%endif
+
+%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
-Name: python-dnspython
+Name: python-dnspython%{psuffix}
Version: 2.2.0
Release: 0
Summary: A DNS toolkit for Python
@@ -28,10 +37,10 @@ URL: https://github.com/rthalley/dnspython
Source: https://files.pythonhosted.org/packages/source/d/dnspython/dnspython-%{version}.tar.gz
BuildRequires: %{python_module base >= 3.6}
BuildRequires: %{python_module pip}
-BuildRequires: %{python_module poetry}
-# SECTION tests
-#BuildRequires: %%{python_module ecdsa}
-#BuildRequires: %%{python_module pycryptodome}
+BuildRequires: %{python_module poetry-core}
+BuildRequires: fdupes
+BuildRequires: python-rpm-macros
+%if %{with test}
BuildRequires: %{python_module typing}
# doh:
BuildRequires: %{python_module httpx}
@@ -47,19 +56,14 @@ BuildRequires: %{python_module trio >= 0.14.0}
# curio
BuildRequires: %{python_module sniffio >= 1.1}
BuildRequires: %{python_module curio >= 1.2}
-BuildRequires: fdupes
-BuildRequires: python-rpm-macros
-# /SECTION tests
BuildRequires: %{python_module pytest}
BuildRequires: netcfg
-BuildRequires: unzip
BuildRequires: (python3-contextvars if python3-base < 3.7)
-BuildRequires: (python36-contextvars if python36-base)
-#Requires: python-ecdsa
-#Requires: python-pycryptodome
-%if %{python_version_nodots} < 37
+%endif
+%if 0%{?python_version_nodots} < 37
Requires: python-contextvars
%endif
+# Requires despite optional: see description
# doh
Requires: python-requests
Requires: python-h2
@@ -107,17 +111,23 @@ chmod -x dns/win32util.py
%build
%pyproject_wheel
+%if !%{with test}
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}/
+%endif
+%if %{with test}
%check
%pytest
+%endif
+%if !%{with test}
%files %{python_files}
%license LICENSE
%doc README.md examples/
%{python_sitelib}/dns/
%{python_sitelib}/dnspython-%{version}.dist-info/
+%endif
%changelog