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