Blob Blame History Raw
%{!?python_sitelib_platform: %define python_sitelib_platform %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

%define oname pyinotify

Summary: Monitor filesystem events with Python under Linux
Name: python-inotify
Version: 0.7.1
Release: 1%{?dist}
License: GPLv2+
Group: Development/Libraries
URL: http://pyinotify.sourceforge.net/
Source0: http://downloads.sourceforge.net/%{oname}/%{oname}-%{version}.tar.bz2
BuildRequires: python-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root

%description
This is a Python module for watching filesystems changes. pyinotify
can be used for various kind of fs monitoring. pyinotify relies on a
recent Linux Kernel feature (merged in kernel 2.6.13) called
inotify. inotify is an event-driven notifier, its notifications are
exported from kernel space to user space.

%package examples
Summary: Examples for Python inotify module
Group: Development/Libraries
Requires: python-inotify = %{version}-%{release}

%description examples
This package includes some examples usage of the Python inotify module,
extensive documentation is also included.

%prep
%setup -q -n %{oname}-%{version}

%build
CFLAGS="%{optflags}" %{__python} setup.py build

%install
%{__rm} -rf %{buildroot}
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
%{__install} -d %{buildroot}%{_datadir}/%{name}
%{__cp} -a src/examples %{buildroot}%{_datadir}/%{name}

# libs installed, no need for autopath
%{__rm} -f %{buildroot}%{_datadir}/%{name}/examples/autopath.*

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-, root, root, -)
%doc AUTHORS COPYING ChangeLog README TODO
%{python_sitelib_platform}/%{oname}.pth
%{python_sitelib_platform}/%{oname}

%files examples
%doc doc/*
%{_datadir}/%{name}

%changelog
* Wed Aug 08 2007 Terje Rosten <terjeros@phys.ntnu.no> - 0.7.1-1
- New upstream release: 0.7.1
- Fix license tag

* Mon Jun 25 2007 Terje Rosten <terjeros@phys.ntnu.no> - 0.7.0-3
- Remove autopath from example package (bz #237464)

* Tue Mar 27 2007 Terje Rosten <terjeros@phys.ntnu.no> - 0.7.0-2
- Fix email address

* Tue Mar  6 2007 Terje Rosten <terjeros@phys.ntnu.no> - 0.7.0-1
- Initial build