]>
Commit | Line | Data |
---|---|---|
b9340c28 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # unit tests | |
4 | ||
7f04bb73 JR |
5 | %define module dns |
6 | Summary: dnspython - a DNS toolkit for Python 3 | |
7 | Summary(pl.UTF-8): dnspython - zestaw narzędzi do DNS dla Pythona 3 | |
f9edd3a6 | 8 | Name: python3-%{module} |
39d40d06 | 9 | Version: 2.2.0 |
7f04bb73 JR |
10 | Release: 1 |
11 | License: MIT | |
12 | Group: Development/Languages/Python | |
b9340c28 | 13 | Source0: https://files.pythonhosted.org/packages/source/d/dnspython/dnspython-%{version}.tar.gz |
39d40d06 | 14 | # Source0-md5: 6a247a755f7676f115c0e555842550d5 |
b9340c28 JB |
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 | |
21 | %if %{with tests} | |
22 | BuildRequires: python3-pytest >= 5.4.1 | |
23 | # < 7 according to pyproject.toml | |
24 | %endif | |
7f04bb73 | 25 | BuildRequires: rpmbuild(macros) >= 1.714 |
39d40d06 | 26 | BuildRequires: rpm-pythonprov |
7f04bb73 JR |
27 | Requires: python3-modules >= 1:3.6 |
28 | BuildArch: noarch | |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
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. | |
35 | ||
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. | |
40 | ||
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. | |
46 | ||
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. | |
52 | ||
53 | %prep | |
54 | %setup -q -n dnspython-%{version} | |
b9340c28 | 55 | %patch0 -p1 |
7f04bb73 JR |
56 | |
57 | %build | |
58 | %py3_build | |
59 | ||
b9340c28 JB |
60 | %if %{with tests} |
61 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
62 | %{__python3} -m pytest tests | |
63 | %endif | |
64 | ||
7f04bb73 JR |
65 | %install |
66 | rm -rf $RPM_BUILD_ROOT | |
67 | ||
68 | %py3_install | |
69 | ||
70 | install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} | |
71 | cp -pr examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} | |
72 | ||
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 | |
75 | ||
76 | %clean | |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | ||
79 | %files | |
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} |