%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %global appname inotifyx Name: python-%{appname} Version: 0.1.0 Release: 1.n0i.1%{?dist} Summary: A simple Python binding to the Linux inotify file system event monitoring API Group: Development/Languages License: GPLv2 URL: http://www.alittletooquiet.net/software/%{appname}/ Source0: http://www.alittletooquiet.net/media/release/%{appname}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel %description inotifyx is a Python extension providing access to the Linux inotify file system event notification API. It is primarily written in C but has some Python window dressing. inotifyx exists as an alternative to the better known pyinotify bindings. Reasons you might choose inotifyx over pyinotify: * inotifyx is a C extension and does not use ctypes, making it faster and less prone to subtle breakage due to changes in the inotify API. * inotifyx is a much thinner wrapper around inotify. pyinotify is more complicated. It does provide features that inotifyx does not, but many of them are not needed by most applications. * The API provided by pyinotify seems to change in incompatible ways on a fairly regular basis and with little justification. inotifyx has a simple API that will change rarely, if ever. %prep %setup -q -n %{appname}-%{version} %build CFLAGS="$RPM_OPT_FLAGS" %{__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 AUTHORS COPYING NEWS README %{python_sitearch}/* %changelog * Fri Aug 28 2009 Marius FERARU - 0.1.0-1.n0i.1 - initial packaging