]> git.pld-linux.org Git - packages/python-defusedxml.git/blame - python-defusedxml.spec
rebuild with python 3.10
[packages/python-defusedxml.git] / python-defusedxml.spec
CommitLineData
78a30241
AM
1#
2# Conditional build:
c6003571 3%bcond_without tests # unit tests
78a30241
AM
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7%define module defusedxml
321c3bce 8%define pypi_name defusedxml
78a30241 9Summary: XML bomb protection for Python stdlib modules
e92c5070 10Summary(pl.UTF-8): Zabezpieczenie przed bombami XML dla modułów biblioteki standardowej Pythona
78a30241 11Name: python-%{module}
c6003571 12Version: 0.7.1
53f7e7f6 13Release: 3
e92c5070 14License: PSF v2
78a30241 15Group: Libraries/Python
e92c5070
JB
16#Source0Download: https://pypi.org/simple/defusedxml/
17Source0: https://files.pythonhosted.org/packages/source/d/defusedxml/%{pypi_name}-%{version}.tar.gz
c6003571 18# Source0-md5: a50e7f21aa60a741efe6b1b658dfb3f8
e92c5070
JB
19Patch0: python-defusedxml-format_strings.patch
20URL: https://pypi.org/project/defusedxml/
21BuildRequires: rpmbuild(macros) >= 1.714
78a30241 22%if %{with python2}
e92c5070 23BuildRequires: python-modules >= 1:2.7
0f49ccd6 24BuildRequires: python-setuptools
78a30241
AM
25%endif
26%if %{with python3}
e92c5070 27BuildRequires: python3-modules >= 1:3.5
9ad999eb 28BuildRequires: python3-setuptools
78a30241 29%endif
e92c5070 30Requires: python-modules >= 1:2.7
78a30241
AM
31BuildArch: noarch
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
35XML bomb protection for Python stdlib modules.
36
e92c5070
JB
37%description -l pl.UTF-8
38Zabezpieczenie przed bombami XML dla modułów biblioteki standardowej
39Pythona.
40
78a30241
AM
41%package -n python3-%{module}
42Summary: XML bomb protection for Python stdlib modules
e92c5070 43Summary(pl.UTF-8): Zabezpieczenie przed bombami XML dla modułów biblioteki standardowej Pythona
78a30241 44Group: Libraries/Python
e92c5070 45Requires: python3-modules >= 1:3.5
78a30241
AM
46
47%description -n python3-%{module}
48XML bomb protection for Python stdlib modules.
49
e92c5070
JB
50%description -n python3-%{module} -l pl.UTF-8
51Zabezpieczenie przed bombami XML dla modułów biblioteki standardowej
52Pythona.
53
78a30241
AM
54%prep
55%setup -q -n %{module}-%{version}
039e98b0 56%patch0 -p1
78a30241
AM
57
58%build
59%if %{with python2}
0f49ccd6 60%py_build %{?with_tests:test}
78a30241
AM
61%endif
62
63%if %{with python3}
0f49ccd6 64%py3_build %{?with_tests:test}
78a30241
AM
65%endif
66
67%install
68rm -rf $RPM_BUILD_ROOT
69
70%if %{with python2}
0f49ccd6 71%py_install
78a30241
AM
72
73%py_postclean
74%endif
75
76%if %{with python3}
0f49ccd6 77%py3_install
78a30241
AM
78%endif
79
80%clean
81rm -rf $RPM_BUILD_ROOT
82
83%if %{with python2}
84%files
85%defattr(644,root,root,755)
86%doc README.txt CHANGES.txt
87%dir %{py_sitescriptdir}/%{module}
88%{py_sitescriptdir}/%{module}/*.py[co]
78a30241
AM
89%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
90%endif
78a30241
AM
91
92%if %{with python3}
93%files -n python3-%{module}
94%defattr(644,root,root,755)
95%doc README.txt CHANGES.txt
96%{py3_sitescriptdir}/%{module}
97%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
98%endif
This page took 0.108668 seconds and 4 git commands to generate.