%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.1 Release: 2%{?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 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: libicu BuildRequires: libicu-devel BuildRequires: gcc-c++ %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. %prep %setup -q -n %{realname}-%{version} %build %{__python} setup.py build # we don't want to provide private python extension libs %{?filter_setup: %filter_provides_in %{python_sitearch}/.*\.so$ %filter_setup } %check %{__python} setup.py test %install rm -rf %{buildroot} %{__python} setup.py install --skip-build --root %{buildroot} # Remove tests rm -rf %{buildroot}%{python_sitearch}/tests %files %defattr(-,root,root,-) %doc LICENSE README CHANGES CREDITS %{python_sitearch}/docs.* %{python_sitearch}/icu.* %{python_sitearch}/_icu.so %{python_sitearch}/%{realname}.* %{python_sitearch}/%{realname}-%{version}-py?.?.egg-info/* %changelog * Sun May 08 2011 Prabin Kumar Datta - 1.1-2 - added CHANGES CREDITS under doc section - updated URL - added check section * Thu Mar 17 2011 Prabin Kumar Datta - 1.1-1 - Initial build