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