%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 %global tarball_name pyutf8 Name: pyutf8 Version: 0.1.1 Release: 2%{?dist} Summary: Extension for dealing with valid and invalid UTF-8 strings Group: Development/Languages License: MIT URL: http://pypi.python.org/pypi/pyutf8 Source0: http://pypi.python.org/packages/source/p/pyutf8/%{tarball_name}-%{version}.tar.gz BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: python-devel # filter to not provide private python extension libs %{?filter_setup: %filter_provides_in %{python_sitearch}/.*\.so$ %filter_setup } %description pyutf8 provides tools to efficiently deal with the validation and cleanup of UTF-8 strings. The primary use case is "garbage in UTF-8 out". %prep %setup -qn %{tarball_name}-%{version} %build %{__python} setup.py build %install rm -rf %{buildroot} %{__python} setup.py install --skip-build --root=$RPM_BUILD_ROOT %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc LICENSE.txt README.rst %{python_sitelib}/* %changelog * Wed Nov 17 2010 Daniel Bruno dbruno@fedoraproject.org - 0.1.1-2 - Initial Package