]> git.pld-linux.org Git - packages/python-ruamel.ordereddict.git/blob - python-ruamel.ordereddict.spec
a011a47b6890732ae7559e6e67424961694abbca
[packages/python-ruamel.ordereddict.git] / python-ruamel.ordereddict.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_with     python3 # CPython 3.2 module
5 %bcond_without  tests   # unit tests
6
7 %define         module          ruamel.ordereddict
8 Summary:        A version of dict that keeps keys in insertion resp. sorted order
9 Summary(pl.UTF-8):      Wersja słownika trzymająca klucze w kolejności wstawiania
10 Name:           python-%{module}
11 Version:        0.4.14
12 Release:        3
13 License:        MIT
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/ruamel.ordereddict/
16 Source0:        https://files.pythonhosted.org/packages/source/r/ruamel.ordereddict/%{module}-%{version}.tar.gz
17 # Source0-md5:  e0723a39e81fdf5d986d892dc5a94bb8
18 URL:            https://pypi.org/project/ruamel.ordereddict/
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.6
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 BuildRequires:  python-pytest
24 %endif
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-modules >= 1:3.2
28 BuildRequires:  python3-setuptools
29 %if %{with tests}
30 BuildRequires:  python3-pytest
31 %endif
32 %endif
33 BuildRequires:  rpm-pythonprov
34 BuildRequires:  rpmbuild(macros) >= 1.714
35 Requires:       python-modules >= 1:2.6
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 A version of dict that keeps keys in insertion resp. sorted order.
40
41 %description -l pl.UTF-8
42 Wersja słownika (dict) trzymająca klucze w kolejności wstawiania
43
44 %package -n python3-ruamel.ordereddict
45 Summary:        A version of dict that keeps keys in insertion resp. sorted order
46 Summary(pl.UTF-8):      Wersja słownika trzymająca klucze w kolejności wstawiania
47 Group:          Libraries/Python
48 Requires:       python3-modules >= 1:3.2
49
50 %description -n python3-ruamel.ordereddict
51 A version of dict that keeps keys in insertion resp. sorted order.
52
53 %description -n python3-ruamel.ordereddict -l pl.UTF-8
54 Wersja słownika (dict) trzymająca klucze w kolejności wstawiania
55
56 %prep
57 %setup -q -n %{module}-%{version}
58
59 %build
60 %if %{with python2}
61 %py_build
62
63 touch $(echo build-2/lib.*/ruamel)/__init__.py
64 PYTHONPATH=$(readlink -f build-2/lib.*) \
65 %{__python} -m pytest test/test_{ordereddict,py2,py27}.py
66 %endif
67
68 %if %{with python3}
69 %py3_build
70
71 touch $(echo build-3/lib.*/ruamel)/__init__.py
72 PYTHONPATH=$(readlink -f build-3/lib.*) \
73 %{__python3} -m pytest test/test_{orderreddict,py3}.py
74 %endif
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78
79 %if %{with python2}
80 %py_install
81
82 %py_postclean
83 %endif
84
85 %if %{with python3}
86 %py3_install
87 %endif
88
89 %clean
90 rm -rf $RPM_BUILD_ROOT
91
92 %if %{with python2}
93 %files
94 %defattr(644,root,root,755)
95 %doc LICENSE README.rst
96 %{py_sitedir}/ruamel/ordereddict
97 %attr(755,root,root) %{py_sitedir}/_ordereddict.so
98 %{py_sitedir}/ruamel.ordereddict-%{version}-py*.egg-info
99 %{py_sitedir}/ruamel.ordereddict-%{version}-py*-nspkg.pth
100 %endif
101
102 %if %{with python3}
103 %files -n python3-ruamel.ordereddict
104 %defattr(644,root,root,755)
105 %doc LICENSE README.rst
106 %{py3_sitedir}/ruamel/ordereddict
107 %attr(755,root,root) %{py3_sitedir}/_ordereddict.cpython-*.so
108 %{py3_sitedir}/ruamel.ordereddict-%{version}-py*.egg-info
109 %{py3_sitedir}/ruamel.ordereddict-%{version}-py*-nspkg.pth
110 %endif
This page took 0.084455 seconds and 2 git commands to generate.