2006-10-27 11:06:13 +02:00
|
|
|
#
|
2010-10-12 00:29:53 +02:00
|
|
|
# spec file for package python-pyinotify (Version 0.9.0)
|
2006-10-27 11:06:13 +02:00
|
|
|
#
|
2010-10-12 00:29:53 +02:00
|
|
|
# Copyright (c) 2006-2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2006-10-27 11:06:13 +02:00
|
|
|
# This file and all modifications and additions to the pristine
|
|
|
|
# package are under the same license as the package itself.
|
|
|
|
#
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2010-10-12 00:29:53 +02:00
|
|
|
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
|
|
|
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
|
|
|
|
2006-10-27 11:06:13 +02:00
|
|
|
Name: python-pyinotify
|
|
|
|
BuildRequires: python-devel
|
2010-10-12 00:29:53 +02:00
|
|
|
BuildRequires: perl
|
|
|
|
URL: http://github.com/seb-m/pyinotify
|
|
|
|
License: BSD License
|
|
|
|
Group: Development/Libraries/Python
|
|
|
|
Version: 0.9.0
|
|
|
|
%define tag ec5a9f4
|
|
|
|
%define subdir d2ffa6a
|
2006-10-27 11:06:13 +02:00
|
|
|
Release: 1
|
|
|
|
Summary: Python module for watching filesystems changes
|
2010-10-12 00:29:53 +02:00
|
|
|
Source: http://download.github.com/seb-m-pyinotify-%{version}-0-g%{tag}.tar.gz
|
2006-10-27 11:06:13 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2010-10-12 00:29:53 +02:00
|
|
|
%if 0%{?suse_version} >= 1120
|
|
|
|
BuildArch: noarch
|
|
|
|
%endif
|
2006-10-27 11:06:13 +02:00
|
|
|
%{py_requires}
|
|
|
|
|
|
|
|
%description
|
2010-10-12 00:29:53 +02:00
|
|
|
pyinotify is a Python module for watching filesystems changes. By its design
|
|
|
|
pyinotify can be used for any 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. The raw interface of inotify is
|
|
|
|
compounded of three system calls. pyinotify binds these system calls and
|
|
|
|
provides an implementation on top of them offering a generic and abstract way
|
|
|
|
to use inotify with Python. Pyinotify doesn't requires much detailed knowledge
|
|
|
|
of inotify. Moreover, it only needs few statements for initializing, watching,
|
|
|
|
handling (eventually trough a new separate thread), and processing events
|
|
|
|
notifications through subclassing. The only things to know is the path of items
|
|
|
|
to watch, the kind of events to monitor and the actions to execute on these
|
|
|
|
notifications.
|
|
|
|
|
|
|
|
Note: pyinotify requires Python 2.3 and above, and Linux 2.6.13 at least.
|
|
|
|
|
|
|
|
|
2006-10-27 11:06:13 +02:00
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
2010-10-12 00:29:53 +02:00
|
|
|
Sebastien Martini <seb@dbzteam.org>
|
2006-10-27 11:06:13 +02:00
|
|
|
|
|
|
|
%prep
|
2010-10-12 00:29:53 +02:00
|
|
|
%setup -q -n "seb-m-pyinotify-%{subdir}"
|
2006-10-27 11:06:13 +02:00
|
|
|
|
|
|
|
%build
|
2010-10-12 00:29:53 +02:00
|
|
|
export CFLAGS="%{optflags}"
|
|
|
|
%__python ./setup.py build
|
2006-10-27 11:06:13 +02:00
|
|
|
|
|
|
|
%install
|
2010-10-12 00:29:53 +02:00
|
|
|
%__python ./setup.py install --prefix="%{_prefix}" --root="%{buildroot}" --record-rpm=INSTALLED_FILES
|
2006-10-27 11:06:13 +02:00
|
|
|
|
|
|
|
%clean
|
2010-10-12 00:29:53 +02:00
|
|
|
%{?buildroot:%__rm -rf "%{buildroot}"}
|
2006-10-27 11:06:13 +02:00
|
|
|
|
|
|
|
%files -f INSTALLED_FILES
|
|
|
|
%defattr(-,root,root)
|
2010-10-12 00:29:53 +02:00
|
|
|
%doc ACKS COPYING README
|
|
|
|
%doc python2/examples
|
|
|
|
|