]> git.pld-linux.org Git - SPECS.git/blob - python-xmltodict.spec
SPECS updated Tue 30 Apr 15:13:02 CEST 2024
[SPECS.git] / python-xmltodict.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        Make working with XML feel like you are working with JSON
8 Summary(pl.UTF-8):      Praca z XML działająca jak z JSON-em
9 Name:           python-xmltodict
10 # keep 0.12.x here for python2 support
11 Version:        0.12.0
12 Release:        4
13 License:        MIT
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/xmltodict/
16 Source0:        https://files.pythonhosted.org/packages/source/x/xmltodict/xmltodict-%{version}.tar.gz
17 # Source0-md5:  ddb2bd078cef4f7e3021a578034ad941
18 URL:            https://pypi.org/project/xmltodict/
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.7
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 BuildRequires:  python-nose >= 1.0
24 %endif
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-modules >= 1:3.4
28 BuildRequires:  python3-setuptools
29 %if %{with tests}
30 BuildRequires:  python3-nose >= 1.0
31 %endif
32 %endif
33 BuildRequires:  rpm-pythonprov
34 BuildRequires:  rpmbuild(macros) >= 1.714
35 Requires:       python-modules >= 1:2.7
36 BuildArch:      noarch
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 xmltodict is a Python module that makes working with XML feel like you
41 are working with JSON.
42
43 %description -l pl.UTF-8
44 xmltodict to moduł Pythona upodabniający pracę z XML-em do pracy z
45 JSON-em.
46
47 %package -n python3-xmltodict
48 Summary:        Make working with XML feel like you are working with JSON
49 Summary(pl.UTF-8):      Praca z XML działająca jak z JSON-em
50 Group:          Libraries/Python
51 Requires:       python3-modules >= 1:3.4
52
53 %description -n python3-xmltodict
54 xmltodict is a Python module that makes working with XML feel like you
55 are working with JSON.
56
57 %description -n python3-xmltodict -l pl.UTF-8
58 xmltodict to moduł Pythona upodabniający pracę z XML-em do pracy z
59 JSON-em.
60
61 %prep
62 %setup -q -n xmltodict-%{version}
63
64 %build
65 %if %{with python2}
66 %py_build
67
68 %if %{with tests}
69 %{__python} -m unittest discover -s tests
70 %endif
71 %endif
72
73 %if %{with python3}
74 %py3_build
75
76 %if %{with tests}
77 %{__python3} -m unittest discover -s tests
78 %endif
79 %endif
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83
84 %if %{with python2}
85 %py_install
86
87 %py_postclean
88 %endif
89
90 %if %{with python3}
91 %py3_install
92 %endif
93
94 %clean
95 rm -rf $RPM_BUILD_ROOT
96
97 %if %{with python2}
98 %files
99 %defattr(644,root,root,755)
100 %doc LICENSE README.md
101 %{py_sitescriptdir}/xmltodict.py[co]
102 %{py_sitescriptdir}/xmltodict-%{version}-py*.egg-info
103 %endif
104
105 %if %{with python3}
106 %files -n python3-xmltodict
107 %defattr(644,root,root,755)
108 %doc LICENSE README.md
109 %{py3_sitescriptdir}/xmltodict.py
110 %{py3_sitescriptdir}/__pycache__/xmltodict.cpython-*.py[co]
111 %{py3_sitescriptdir}/xmltodict-%{version}-py*.egg-info
112 %endif
This page took 0.059885 seconds and 3 git commands to generate.