%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: python-event Version: 0.3 Release: 1%{?dist} Summary: Python extension module for libevent Group: Development/Languages License: BSD URL: http://code.google.com/p/pyevent/ Source0: http://pyevent.googlecode.com/files/pyevent-0.3.tar.gz Patch0: %{name}-%{version}-setup.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel BuildRequires: python-setuptools-devel BuildRequires: libevent-devel Requires: libevent %description The event module provides a mechanism to execute a function when a specific event on a file handle, file descriptor, or signal occurs, or after a given time has passed. %prep %setup -q -n pyevent-%{version} %patch0 -p1 -b .setup %build CFLAGS="%{optflags}" %{__python} -c 'import setuptools; execfile("setup.py")' build %install %{__rm} -rf %{buildroot} %{__python} -c 'import setuptools; execfile("setup.py")' install --skip-build --root %{buildroot} %clean %{__rm} -rf %{buildroot} %check ./test.py %files %defattr(-,root,root,-) %doc CHANGES LICENSE README %{python_sitearch}/* %changelog * Wed Jul 30 2008 Ricky Zhou - 0.3-1 - Initial RPM Package.