3 %bcond_without tests # unit tests
6 Summary: dnspython - a DNS toolkit for Python 3
7 Summary(pl.UTF-8): dnspython - zestaw narzędzi do DNS dla Pythona 3
8 Name: python3-%{module}
12 Group: Development/Languages/Python
13 Source0: https://files.pythonhosted.org/packages/source/d/dnspython/dnspython-%{version}.tar.gz
14 # Source0-md5: 6a247a755f7676f115c0e555842550d5
15 Patch0: %{name}-no-wheel.patch
16 URL: https://www.dnspython.org/
17 BuildRequires: python3-devel >= 1:3.6
18 BuildRequires: python3-setuptools >= 1:44
19 BuildRequires: python3-setuptools_scm >= 3.4.3
20 BuildRequires: python3-toml
22 BuildRequires: python3-pytest >= 5.4.1
23 # < 7 according to pyproject.toml
25 BuildRequires: rpmbuild(macros) >= 1.714
26 BuildRequires: rpm-pythonprov
27 Requires: python3-modules >= 1:3.6
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 dnspython is a DNS toolkit for Python. It supports almost all record
33 types. It can be used for queries, zone transfers, and dynamic
34 updates. It supports TSIG authenticated messages and EDNS0.
36 dnspython provides both high and low level access to DNS. The high
37 level classes perform queries for data of a given name, type, and
38 class, and return an answer set. The low level classes allow direct
39 manipulation of DNS zones, messages, names, and records.
41 %description -l pl.UTF-8
42 dnspython to zestaw narzędzi do DNS dla Pythona. Obsługuje prawie
43 wszystkie rodzaje rekordów. Może być używany do zapytań, transferów
44 stref oraz dynamicznych uaktualnień. Obsługuje uwierzytelnione
45 komunikaty TSIG oraz EDNS0.
47 dnspython dostarcza zarówno wysoko- jak i niskopoziomowy dostęp do
48 DNS-a. Klasy wysokopoziomowe wykonują zapytania o dane dla podanej
49 nazwy, rodzaju i klasy, a zwracają zbiór odpowiedzi. Klasy
50 niskopoziomowe umożliwiają bezpośrednie manipulacje na strefach,
51 komunikatach, nazwach i rekordach w DNS-ie.
54 %setup -q -n dnspython-%{version}
61 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
62 %{__python3} -m pytest tests
66 rm -rf $RPM_BUILD_ROOT
70 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
71 cp -pr examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
73 sed -E -i -e '1s,#!\s*/usr/bin/env\s+python(\s|$),#!%{__python3}\1,' -e '1s,#!\s*/usr/bin/env\s+python3(\s|$),#!%{__python3}\1,' \
74 $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}/*.py
77 rm -rf $RPM_BUILD_ROOT
80 %defattr(644,root,root,755)
81 %doc LICENSE README.md
82 %{py3_sitescriptdir}/dns
83 %{py3_sitescriptdir}/dnspython-%{version}-py*.egg-info
84 %{_examplesdir}/python3-%{module}-%{version}