[packages/python3-py3dns] - python-pydns.spec updated to version 4.0.2 of py3dns port

qboosh qboosh at pld-linux.org
Sat Dec 13 20:37:34 CET 2025


commit 3a8321417a33f4bc8acc01a01a0c1166301035dc
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Dec 13 20:37:51 2025 +0100

    - python-pydns.spec updated to version 4.0.2 of py3dns port

 python-pydns.spec => python3-py3dns.spec | 58 +++++++++++++++-----------------
 1 file changed, 28 insertions(+), 30 deletions(-)
---
diff --git a/python-pydns.spec b/python3-py3dns.spec
similarity index 55%
rename from python-pydns.spec
rename to python3-py3dns.spec
index c804994..a3c7a00 100644
--- a/python-pydns.spec
+++ b/python3-py3dns.spec
@@ -1,25 +1,33 @@
-%define 	module	pydns
+#
+# Conditional build:
+%bcond_with	tests	# unit tests (require network, some rely on external resources)
+
+%define 	module	py3dns
 Summary:	Python module for DNS (Domain Name Service)
 Summary(pl.UTF-8):	Moduł Pythona do usługi DNS (Domain Name Service)
-Name:		python-%{module}
-Version:	2.3.6
+Name:		python3-%{module}
+Version:	4.0.2
 Release:	1
 License:	Python (CNRI)
 Group:		Development/Languages/Python
-Source0:	https://downloads.sourceforge.net/pydns/%{module}-%{version}.tar.gz
-# Source0-md5:	d12ca75251854ab6fcabbaff6909b690
-URL:		https://pydns.sourceforge.net/
-BuildRequires:	python-modules >= 1:2.6
+Source0:	https://files.pythonhosted.org/packages/source/p/py3dns/%{module}-%{version}.tar.gz
+# Source0-md5:	1623680ae77bd4723ed75996cb85c48e
+URL:		https://pypi.org/project/py3dns/
+BuildRequires:	python3-build
+BuildRequires:	python3-flit_core >= 3.2
+BuildRequires:	python3-flit_core < 4
+BuildRequires:	python3-installer
+BuildRequires:	python3-modules >= 1:3.2
 BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.714
-Requires:	python-modules >= 1:2.6
+BuildRequires:	rpmbuild(macros) >= 2.044
+Requires:	python3-modules >= 1:3.2
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 This is a another release of the pydns code, as originally written by
 Guido van Rossum, and with a hopefully nicer API bolted over the top
-of it by Anthony Baxter.
+of it by Anthony Baxter. Ported to Python 3 by Scott Kitterman.
 
 This package contains a module (dnslib) that implements a DNS (Domain
 Name Server) client, plus additional modules that define some symbolic
@@ -28,7 +36,7 @@ constants used by DNS (dnstype, dnsclass, dnsopcode).
 %description -l pl.UTF-8
 To kolejne wydanie kodu pydns, pierwotnie napisanego przez Guido van
 Rossuma, z dodanym powyżej ładniejszym API autorstwa Antony'ego
-Baxtera.
+Baxtera. Przeniesione do Pythona 3 przez Scotta Kittermana.
 
 Ten pakiet zawiera moduł (dnslib), implementujący klienta DNS (Domain
 Name Service - usługi nazw domenowych) oraz dodatkowe moduły,
@@ -38,33 +46,23 @@ definiujące trochę stałych symbolicznych, używanych przez DNS
 %prep
 %setup -q -n %{module}-%{version}
 
-# Some files are latin-1 encoded but are incorrectly labelled as UTF-8 by
-# upstream (see rhbz:620265)
-#
-# Convert them to actually be UTF-8, preserving the (now-correct) encoding
-# declaration (preserving timestamps):
-for file in DNS/Lib.py DNS/Type.py ; do
-	iconv -f ISO-8859-1 -t UTF-8 -o $file.new $file && \
-	touch -r $file $file.new && \
-	%{__mv} $file.new $file
-done
-
 %build
-%py_build
+%py3_build_pyproject
+
+%if %{with tests}
+%{__python3} test.py
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%py_install
-
-%py_postclean
+%py3_install_pyproject
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc CREDITS.txt LICENSE README.txt README-guido.txt
-%dir %{py_sitescriptdir}/DNS
-%{py_sitescriptdir}/DNS/*.py[co]
-%{py_sitescriptdir}/pydns-%{version}-py*.egg-info
+%doc CHANGES CREDITS.txt LICENSE README.txt README-guido.txt
+%{py3_sitescriptdir}/DNS
+%{py3_sitescriptdir}/py3dns-%{version}.dist-info
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-py3dns.git/commitdiff/3a8321417a33f4bc8acc01a01a0c1166301035dc



More information about the pld-cvs-commit mailing list