python-pyinotify/python-pyinotify.spec

70 lines
2.6 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-pyinotify
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: python-pyinotify
Version: 0.9.4
Release: 0
Summary: Python module for watching filesystems changes
License: MIT
Group: Development/Libraries/Python
Url: http://github.com/seb-m/pyinotify
# downloaded from https://github.com/seb-m/pyinotify/tags
Source: pyinotify-%{version}.tar.gz
Source1: pyinotify
BuildRequires: python-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch: noarch
%endif
%description
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.
%prep
%setup -q -n pyinotify-%{version}
%build
python setup.py build
%install
python ./setup.py install --prefix=%{_prefix} --root=%{buildroot}
install -D -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/pyinotify
%files
%defattr(-,root,root)
%doc ACKS COPYING README.md python2/examples
%{_bindir}/pyinotify
%{python_sitelib}/*
%changelog