# sitelib for noarch packages, sitearch for others (remove the unneeded one) %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %global tarname Whoosh Name: python-whoosh Version: 0.3.9 Release: 2%{?dist} Summary: Fast, pure-Python full text indexing, search, and spell checking library Group: Development/Languages License: ASL 2.0 URL: http://whoosh.ca/ Source0: http://pypi.python.org/packages/source/W/%{tarname}/%{tarname}-%{version}.tar.gz Source1: LICENSE.txt BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel BuildRequires: python-setuptools %description Whoosh is a fast, pure-Python indexing and search library. Programmers can use it to easily add search functionality to their applications and websites. Because Whoosh is pure Python, you don't have to compile or install a binary support library and/or make Python work with a JVM, yet Whoosh is still very fast at indexing and searching. Every part of how Whoosh works can be extended or replaced to meet your needs exactly. %prep %setup -q -n %{tarname}-%{version} # Fix script-without-shebang rpmlint warnings. chmod 644 PKG-INFO chmod 644 README.txt chmod 644 src/Whoosh.egg-info/dependency_links.txt chmod 644 src/Whoosh.egg-info/PKG-INFO chmod 644 src/Whoosh.egg-info/SOURCES.txt chmod 644 src/Whoosh.egg-info/top_level.txt chmod 644 src/Whoosh.egg-info/zip-safe # Copy LICENSE.txt from svn cp -p %{SOURCE1} %{_builddir}/%{tarname}-%{version}/ %build %{__python} setup.py build %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc README.txt LICENSE.txt %{python_sitelib}/* %changelog * Fri Dec 18 2009 Allisson Azevedo 0.3.9-2 - Fix BR. - Copy LICENSE.txt from svn to include in rpm. - Fix description. * Wed Dec 9 2009 Allisson Azevedo 0.3.9-1 - Initial RPM release.