- 0.9.0
- Add python 3 subpackage - License changed to MIT
This commit is contained in:
parent
b14b7f1ed3
commit
bc108aea4d
@ -1 +1 @@
|
||||
pyinotify-0.8.8.tar.gz
|
||||
pyinotify-0.9.0.tar.gz
|
||||
|
@ -1,17 +1,22 @@
|
||||
%global with_python3 1
|
||||
|
||||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(0)")}
|
||||
|
||||
%global oname pyinotify
|
||||
|
||||
Summary: Monitor filesystem events with Python under Linux
|
||||
Name: python-inotify
|
||||
Version: 0.8.8
|
||||
Version: 0.9.0
|
||||
Release: 1%{?dist}
|
||||
License: GPLv2+
|
||||
License: MIT
|
||||
Group: Development/Libraries
|
||||
URL: http://trac.dbzteam.org/pyinotify
|
||||
Source0: http://seb.dbzteam.org/pub/pyinotify/releases/pyinotify-%{version}.tar.gz
|
||||
Source1: %{oname}
|
||||
BuildRequires: python-devel
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: python3-devel
|
||||
%endif
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
@ -22,14 +27,28 @@ 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}
|
||||
%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.
|
||||
%description examples
|
||||
This package includes some examples usage of the Python inotify module.
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-inotify
|
||||
Summary: Monitor filesystem events with Python under Linux
|
||||
Group: Development/Languages
|
||||
|
||||
%description -n python3-inotify
|
||||
This is a Python 3 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.
|
||||
|
||||
This is the Python 3 build of pyinotify
|
||||
%endif # if with_python3
|
||||
|
||||
%prep
|
||||
%setup -q -n %{oname}
|
||||
@ -37,36 +56,71 @@ extensive documentation is also included.
|
||||
for f in ChangeLog_old ; do
|
||||
mv $f $f.iso88591
|
||||
iconv -o $f -f iso88591 -t utf8 $f.iso88591
|
||||
rm -f $f.iso88591
|
||||
%{__rm} -f $f.iso88591
|
||||
done
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%{__rm} -rf %{py3dir}
|
||||
cp -a . %{py3dir}
|
||||
%endif
|
||||
|
||||
%build
|
||||
%{__python} setup.py build
|
||||
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py build
|
||||
popd
|
||||
%endif
|
||||
|
||||
%install
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
# Install python 3 first, so that python 2 gets precedence:
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
|
||||
%{__install} -D -m 0755 -p %{SOURCE1} %{buildroot}%{_bindir}/python3-%{oname}
|
||||
%{__sed} -i -e 's/^python /python3 /' %{buildroot}%{_bindir}/python3-%{oname}
|
||||
%{__chmod} 0755 %{buildroot}%{python3_sitelib}/%{oname}.py
|
||||
popd
|
||||
%endif
|
||||
|
||||
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
|
||||
%{__install} -d %{buildroot}%{_datadir}/%{name}
|
||||
#{__cp} -a loop.py chain.py daemon.py loop.py not_quiet.py stats.py \
|
||||
# stats_threaded.py transient_file.py %{buildroot}%{_datadir}/%{name}
|
||||
%{__install} -D -m 0755 -p %{SOURCE1} %{buildroot}%{_bindir}/%{oname}
|
||||
%{__chmod} 0755 %{buildroot}%{python_sitelib}/%{oname}.py
|
||||
|
||||
# examples
|
||||
%{__install} -d -m 0755 %{buildroot}%{_datadir}/%{oname}
|
||||
%{__cp} -a python2/examples/* %{buildroot}%{_datadir}/%{oname}
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
%files
|
||||
%defattr(-, root, root, -)
|
||||
%doc ChangeLog_old NEWS
|
||||
%{python_sitelib}/%{oname}*
|
||||
%doc ACKS COPYING ChangeLog_old NEWS_old README
|
||||
%{_bindir}/%{oname}
|
||||
%{python_sitelib}/%{oname}*
|
||||
|
||||
%files examples
|
||||
%defattr(-, root, root, -)
|
||||
%doc docstrings/*
|
||||
%{_datadir}/%{name}
|
||||
%{_datadir}/%{oname}
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-inotify
|
||||
%defattr(-, root, root, -)
|
||||
%doc ACKS ChangeLog_old COPYING NEWS_old README
|
||||
%{_bindir}/python3-%{oname}
|
||||
%{python3_sitelib}/%{oname}*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Sat Jun 19 2010 Terje Rosten <terje.rosten@ntnu.no> - 0.9.0-1
|
||||
- 0.9.0
|
||||
- Add python 3 subpackage
|
||||
- License changed to MIT
|
||||
|
||||
* Sun Dec 06 2009 Terje Rosten <terje.rosten@ntnu.no> - 0.8.8-1
|
||||
- 0.8.8
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user