]> git.pld-linux.org Git - packages/python-ruamel.ordereddict.git/commitdiff
- unified, pl, tests; release 3
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 27 Jun 2020 16:37:50 +0000 (18:37 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sat, 27 Jun 2020 16:37:50 +0000 (18:37 +0200)
python-ruamel.ordereddict.spec

index bf8ac2a8b013ca4cb0b0d2b755b2a75942eda4af..a011a47b6890732ae7559e6e67424961694abbca 100644 (file)
+#
 # Conditional build:
+%bcond_without python2 # CPython 2.x module
+%bcond_with    python3 # CPython 3.2 module
 %bcond_without tests   # unit tests
 
 %define                module          ruamel.ordereddict
 Summary:       A version of dict that keeps keys in insertion resp. sorted order
+Summary(pl.UTF-8):     Wersja słownika trzymająca klucze w kolejności wstawiania
 Name:          python-%{module}
 Version:       0.4.14
-Release:       2
+Release:       3
 License:       MIT
 Group:         Libraries/Python
 #Source0Download: https://pypi.org/simple/ruamel.ordereddict/
 Source0:       https://files.pythonhosted.org/packages/source/r/ruamel.ordereddict/%{module}-%{version}.tar.gz
 # Source0-md5: e0723a39e81fdf5d986d892dc5a94bb8
 URL:           https://pypi.org/project/ruamel.ordereddict/
+%if %{with python2}
+BuildRequires: python-modules >= 1:2.6
+BuildRequires: python-setuptools
+%if %{with tests}
+BuildRequires: python-pytest
+%endif
+%endif
+%if %{with python3}
+BuildRequires: python3-modules >= 1:3.2
+BuildRequires: python3-setuptools
+%if %{with tests}
+BuildRequires: python3-pytest
+%endif
+%endif
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.714
-BuildRequires: python-modules
-BuildRequires: python-setuptools
-Requires:      python-modules
+Requires:      python-modules >= 1:2.6
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 A version of dict that keeps keys in insertion resp. sorted order.
 
+%description -l pl.UTF-8
+Wersja słownika (dict) trzymająca klucze w kolejności wstawiania
+
+%package -n python3-ruamel.ordereddict
+Summary:       A version of dict that keeps keys in insertion resp. sorted order
+Summary(pl.UTF-8):     Wersja słownika trzymająca klucze w kolejności wstawiania
+Group:         Libraries/Python
+Requires:      python3-modules >= 1:3.2
+
+%description -n python3-ruamel.ordereddict
+A version of dict that keeps keys in insertion resp. sorted order.
+
+%description -n python3-ruamel.ordereddict -l pl.UTF-8
+Wersja słownika (dict) trzymająca klucze w kolejności wstawiania
+
 %prep
 %setup -q -n %{module}-%{version}
 
 %build
-%py_build %{?with_tests:test}
+%if %{with python2}
+%py_build
+
+touch $(echo build-2/lib.*/ruamel)/__init__.py
+PYTHONPATH=$(readlink -f build-2/lib.*) \
+%{__python} -m pytest test/test_{ordereddict,py2,py27}.py
+%endif
+
+%if %{with python3}
+%py3_build
+
+touch $(echo build-3/lib.*/ruamel)/__init__.py
+PYTHONPATH=$(readlink -f build-3/lib.*) \
+%{__python3} -m pytest test/test_{orderreddict,py3}.py
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with python2}
 %py_install
 
 %py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc README.rst
+%doc LICENSE README.rst
 %{py_sitedir}/ruamel/ordereddict
 %attr(755,root,root) %{py_sitedir}/_ordereddict.so
-%{py_sitedir}/%{module}-%{version}-py*.egg-info
-%{py_sitedir}/%{module}-%{version}-py*-nspkg.pth
+%{py_sitedir}/ruamel.ordereddict-%{version}-py*.egg-info
+%{py_sitedir}/ruamel.ordereddict-%{version}-py*-nspkg.pth
+%endif
+
+%if %{with python3}
+%files -n python3-ruamel.ordereddict
+%defattr(644,root,root,755)
+%doc LICENSE README.rst
+%{py3_sitedir}/ruamel/ordereddict
+%attr(755,root,root) %{py3_sitedir}/_ordereddict.cpython-*.so
+%{py3_sitedir}/ruamel.ordereddict-%{version}-py*.egg-info
+%{py3_sitedir}/ruamel.ordereddict-%{version}-py*-nspkg.pth
+%endif
This page took 0.10451 seconds and 4 git commands to generate.