14
0

Compare commits

4 Commits

3 changed files with 43 additions and 6 deletions

View File

@@ -1,3 +1,14 @@
-------------------------------------------------------------------
Mon Sep 15 03:02:51 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch support-dnspython-2.8.0.patch:
* Support dnspython 2.8.0 changes.
-------------------------------------------------------------------
Mon Jun 2 07:54:20 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to pip-based build
-------------------------------------------------------------------
Sat Jul 1 09:07:15 UTC 2023 - ecsos <ecsos@opensuse.org>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-localzone
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,20 +16,22 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%{?sle15_python_module_pythons}
Name: python-localzone
Version: 0.9.8
Release: 0
Summary: A library for managing DNS zones
License: BSD-3-Clause
Group: Development/Languages/Python
URL: https://github.com/ags-slc/localzone
# The PyPI sdist does not provide the tests
Source: https://github.com/ags-slc/localzone/archive/v%{version}.tar.gz#/localzone-%{version}.tar.gz
# PATCH-FIX-UPSTREAM gh#ags-slc/localzone#6
Patch0: support-dnspython-2.8.0.patch
BuildRequires: %{python_module dnspython}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-dnspython
@@ -43,10 +45,10 @@ A simple library for managing DNS zones.
%autosetup -p1 -n localzone-%{version}
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
@@ -56,6 +58,6 @@ A simple library for managing DNS zones.
%doc README.rst
%license LICENSE
%{python_sitelib}/localzone
%{python_sitelib}/localzone-%{version}*-info
%{python_sitelib}/localzone-%{version}.dist-info
%changelog

View File

@@ -0,0 +1,24 @@
From 200f4b47187c137340781ba05f3b79738f86ffa1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lum=C3=ADr=20=27Frenzy=27=20Balhar?=
<frenzy.madness@gmail.com>
Date: Tue, 9 Sep 2025 13:17:37 +0200
Subject: [PATCH] Fix test_zone_add_record_no_content with dnspython 2.8.0
Fixes: https://github.com/ags-slc/localzone/issues/5
---
tests/test_models.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/test_models.py b/tests/test_models.py
index 621f6c0..b4e8687 100644
--- a/tests/test_models.py
+++ b/tests/test_models.py
@@ -78,7 +78,7 @@ def test_zone_add_record_unknown_type():
def test_zone_add_record_no_content():
with localzone.manage(ZONEFILE, ORIGIN) as z:
- with pytest.raises((AttributeError, DNSSyntaxError)):
+ with pytest.raises((AttributeError, DNSSyntaxError, ValueError)):
z.add_record("test", "txt", None)