129 lines
3.7 KiB
RPMSpec
129 lines
3.7 KiB
RPMSpec
%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
|
|
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
|
%endif
|
|
%define realname PyICU
|
|
Name: pyicu
|
|
Version: 1.5
|
|
Release: 8%{?dist}
|
|
Summary: Python extension wrapping IBM's ICU C++ libraries
|
|
Group: Development/Tools
|
|
License: MIT
|
|
URL: http://pyicu.osafoundation.org/
|
|
Source0: http://pypi.python.org/packages/source/P/%{realname}/%{realname}-%{version}.tar.gz
|
|
|
|
BuildRequires: python3-devel
|
|
BuildRequires: python3-setuptools
|
|
BuildRequires: python2-devel
|
|
BuildRequires: python-setuptools
|
|
BuildRequires: libicu
|
|
BuildRequires: libicu-devel
|
|
BuildRequires: gcc-c++
|
|
|
|
Patch0: 0001-fix-build-with-icu-53.1.patch
|
|
|
|
%description
|
|
PyICU is Python extension wrapping IBM's International Components
|
|
for Unicode C++ library (ICU). ICU is a mature, widely used set of
|
|
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}
|
|
|
|
%patch0 -p1
|
|
|
|
rm -rf %{py3dir}
|
|
cp -a . %{py3dir}
|
|
|
|
%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 %{python2_sitearch}/.*\.so$ %{python3_sitearch}/.*\.so$
|
|
%filter_setup
|
|
}
|
|
|
|
%check
|
|
%{__python2} setup.py test
|
|
|
|
pushd %{py3dir}
|
|
%{__python3} setup.py test
|
|
popd
|
|
|
|
%install
|
|
%{__python2} setup.py install --skip-build --root %{buildroot}
|
|
|
|
pushd %{py3dir}
|
|
%{__python3} setup.py install --skip-build --root %{buildroot}
|
|
popd
|
|
|
|
# Remove tests
|
|
rm -rf %{buildroot}%{python2_sitearch}/tests %{buildroot}%{python3_sitearch}/tests
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%doc LICENSE README CHANGES CREDITS
|
|
%{python2_sitearch}/*
|
|
|
|
%files -n python3-pyicu
|
|
%doc LICENSE
|
|
%{python3_sitearch}/*
|
|
|
|
%changelog
|
|
* Tue Aug 26 2014 David Tardon <dtardon@redhat.com> - 1.5-8
|
|
- rebuild for ICU 53.1
|
|
|
|
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5-7
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
|
|
|
* Wed Jul 16 2014 Bastien Nocera <bnocera@redhat.com> 1.5-6
|
|
- Build Python3 version as well (#917449)
|
|
|
|
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5-5
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
|
* Fri Feb 14 2014 Parag Nemade <paragn AT fedoraproject DOT org> - 1.5-4
|
|
- Rebuild for icu 52
|
|
|
|
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5-3
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
|
* Mon Jul 22 2013 David Tardon <dtardon@redhat.com> - 1.5-2
|
|
- rebuild for ICU ABI break
|
|
|
|
* Fri Feb 08 2013 Jon Ciesla <limburgher@gmail.com> - 1.5-1
|
|
- libicu rebuild.
|
|
- Update to 1.5, 1.4 doesn't build on new libicu.
|
|
|
|
* Wed Aug 22 2012 Tom Callaway <spot@fedoraproject.org> - 1.4-1
|
|
- update to 1.4
|
|
|
|
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-3
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
|
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2-2
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
|
|
* Tue Oct 11 2011 Peter Robinson <pbrobinson@fedoraproject.org> - 1.2-1
|
|
- New upstream 1.2 release
|
|
|
|
* Sun May 08 2011 Prabin Kumar Datta <prabindatta@fedoraproject.org> - 1.1-2
|
|
- added CHANGES CREDITS under doc section
|
|
- updated URL
|
|
- added check section
|
|
|
|
* Thu Mar 17 2011 Prabin Kumar Datta <prabindatta@fedoraproject.org> - 1.1-1
|
|
- Initial build
|