From 13049f1eafc3a53a908d74580dad102369c668da Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 16 Jul 2014 22:27:34 +0200 Subject: [PATCH] Build Python3 version as well (#917449) --- pyicu.spec | 45 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/pyicu.spec b/pyicu.spec index c5af186..e4041e8 100644 --- a/pyicu.spec +++ b/pyicu.spec @@ -4,7 +4,7 @@ %define realname PyICU Name: pyicu Version: 1.5 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Python extension wrapping IBM's ICU C++ libraries Group: Development/Tools License: MIT @@ -24,32 +24,61 @@ C/C++ and Java libraries providing Unicode and Globalization support for software applications. ICU is widely portable and gives applications the same results on all platforms and between C/C++ and Javasoftware. +%package -n python3-pyicu +Summary: Python3 extension wrapping IBM's ICU C++ libraries +%description -n python3-pyicu +%{summary}. + %prep %setup -q -n %{realname}-%{version} +rm -rf %{py3dir} +cp -a . %{py3dir} + %build -%{__python} setup.py build + +%{__python2} setup.py build + +pushd %{py3dir} +%{__python3} setup.py build +popd + # we don't want to provide private python extension libs %{?filter_setup: -%filter_provides_in %{python_sitearch}/.*\.so$ +%filter_provides_in %{python2_sitearch}/.*\.so$ %{python3_sitearch}/.*\.so$ %filter_setup } %check -%{__python} setup.py test +%{__python2} setup.py test + +pushd %{py3dir} +%{__python3} setup.py test +popd %install -%{__python} setup.py install --skip-build --root %{buildroot} +%{__python2} setup.py install --skip-build --root %{buildroot} + +pushd %{py3dir} +%{__python3} setup.py install --skip-build --root %{buildroot} +popd + # Remove tests -rm -rf %{buildroot}%{python_sitearch}/tests +rm -rf %{buildroot}%{python2_sitearch}/tests %{buildroot}%{python3_sitearch}/tests %files %defattr(-,root,root,-) %doc LICENSE README CHANGES CREDITS -%{python_sitearch}/*.* -%{python_sitearch}/%{realname}-%{version}-py?.?.egg-info/*.* +%{python2_sitearch}/* + +%files -n python3-pyicu +%doc LICENSE +%{python3_sitearch}/* %changelog +* Wed Jul 16 2014 Bastien Nocera 1.5-6 +- Build Python3 version as well (#917449) + * Sat Jun 07 2014 Fedora Release Engineering - 1.5-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild