]> git.pld-linux.org Git - packages/python3-dns.git/blame - python3-dns.spec
- added no-wheel patch (disable wheel dependency), run tests
[packages/python3-dns.git] / python3-dns.spec
CommitLineData
b9340c28
JB
1#
2# Conditional build:
3%bcond_without tests # unit tests
4
7f04bb73
JR
5%define module dns
6Summary: dnspython - a DNS toolkit for Python 3
7Summary(pl.UTF-8): dnspython - zestaw narzędzi do DNS dla Pythona 3
f9edd3a6 8Name: python3-%{module}
39d40d06 9Version: 2.2.0
7f04bb73
JR
10Release: 1
11License: MIT
12Group: Development/Languages/Python
b9340c28 13Source0: https://files.pythonhosted.org/packages/source/d/dnspython/dnspython-%{version}.tar.gz
39d40d06 14# Source0-md5: 6a247a755f7676f115c0e555842550d5
b9340c28
JB
15Patch0: %{name}-no-wheel.patch
16URL: https://www.dnspython.org/
17BuildRequires: python3-devel >= 1:3.6
18BuildRequires: python3-setuptools >= 1:44
19BuildRequires: python3-setuptools_scm >= 3.4.3
20BuildRequires: python3-toml
21%if %{with tests}
22BuildRequires: python3-pytest >= 5.4.1
23# < 7 according to pyproject.toml
24%endif
7f04bb73 25BuildRequires: rpmbuild(macros) >= 1.714
39d40d06 26BuildRequires: rpm-pythonprov
7f04bb73
JR
27Requires: python3-modules >= 1:3.6
28BuildArch: noarch
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%description
32dnspython is a DNS toolkit for Python. It supports almost all record
33types. It can be used for queries, zone transfers, and dynamic
34updates. It supports TSIG authenticated messages and EDNS0.
35
36dnspython provides both high and low level access to DNS. The high
37level classes perform queries for data of a given name, type, and
38class, and return an answer set. The low level classes allow direct
39manipulation of DNS zones, messages, names, and records.
40
41%description -l pl.UTF-8
42dnspython to zestaw narzędzi do DNS dla Pythona. Obsługuje prawie
43wszystkie rodzaje rekordów. Może być używany do zapytań, transferów
44stref oraz dynamicznych uaktualnień. Obsługuje uwierzytelnione
45komunikaty TSIG oraz EDNS0.
46
47dnspython dostarcza zarówno wysoko- jak i niskopoziomowy dostęp do
48DNS-a. Klasy wysokopoziomowe wykonują zapytania o dane dla podanej
49nazwy, rodzaju i klasy, a zwracają zbiór odpowiedzi. Klasy
50niskopoziomowe umożliwiają bezpośrednie manipulacje na strefach,
51komunikatach, 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}
61PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
62%{__python3} -m pytest tests
63%endif
64
7f04bb73
JR
65%install
66rm -rf $RPM_BUILD_ROOT
67
68%py3_install
69
70install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
71cp -pr examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
72
73sed -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
77rm -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}
This page took 0.037054 seconds and 4 git commands to generate.