pyicu/pyicu.spec

62 lines
1.8 KiB
RPMSpec
Raw Normal View History

2011-05-16 14:41:30 +00:00
%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
2017-01-31 20:53:09 +00:00
Version: 1.1
Release: 2%{?dist}
2011-05-16 14:41:30 +00:00
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
2017-01-31 20:53:09 +00:00
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
2011-05-16 14:41:30 +00:00
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
2017-01-31 20:53:09 +00:00
%{__python} setup.py build
2011-05-16 14:41:30 +00:00
# we don't want to provide private python extension libs
%{?filter_setup:
2017-01-31 20:53:09 +00:00
%filter_provides_in %{python_sitearch}/.*\.so$
2011-05-16 14:41:30 +00:00
%filter_setup
}
%check
2017-01-31 20:53:09 +00:00
%{__python} setup.py test
2011-05-16 14:41:30 +00:00
%install
2017-01-31 20:53:09 +00:00
rm -rf %{buildroot}
%{__python} setup.py install --skip-build --root %{buildroot}
2011-05-16 14:41:30 +00:00
# Remove tests
2017-01-31 20:53:09 +00:00
rm -rf %{buildroot}%{python_sitearch}/tests
2011-05-16 14:41:30 +00:00
%files
%defattr(-,root,root,-)
%doc LICENSE README CHANGES CREDITS
2017-01-31 20:53:09 +00:00
%{python_sitearch}/*.*
%{python_sitearch}/%{realname}-%{version}-py?.?.egg-info/*.*
2011-05-16 14:41:30 +00:00
%changelog
* 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