Blame SPECS/python-inotify.spec

39bc47
%if 0%{?fedora}
39bc47
%global with_python3 1
39bc47
%endif
39bc47
39bc47
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(0)")}
39bc47
39bc47
%global oname  pyinotify
39bc47
39bc47
Summary:       Monitor filesystem events with Python under Linux
39bc47
Name:          python-inotify
39bc47
Version:       0.9.4
97753a
Release:       4%{?dist}
39bc47
License:       MIT
39bc47
Group:         Development/Libraries
39bc47
URL:           https://github.com/seb-m/pyinotify
39bc47
Source0:       http://seb.dbzteam.org/pub/pyinotify/releases/pyinotify-%{version}.tar.gz
39bc47
Source1:       %{oname}
39bc47
BuildRequires: python-devel
39bc47
%if 0%{?with_python3}
39bc47
BuildRequires: python3-devel
39bc47
%endif
39bc47
BuildArch:     noarch
39bc47
BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
39bc47
39bc47
%description
39bc47
This is a Python module for watching filesystems changes. pyinotify
39bc47
can be used for various kind of fs monitoring. pyinotify relies on a
39bc47
recent Linux Kernel feature (merged in kernel 2.6.13) called
39bc47
inotify. inotify is an event-driven notifier, its notifications are
39bc47
exported from kernel space to user space.
39bc47
39bc47
%package       examples
39bc47
Summary:       Examples for Python inotify module
39bc47
Group:         Development/Libraries
39bc47
Requires:      python-inotify = %{version}-%{release}
39bc47
39bc47
%description   examples
39bc47
This package includes some examples usage of the Python inotify module.
39bc47
39bc47
%if 0%{?with_python3}
39bc47
%package -n    python3-inotify
39bc47
Summary:       Monitor filesystem events with Python under Linux
39bc47
Group:         Development/Languages
39bc47
39bc47
%description -n python3-inotify
39bc47
This is a Python 3 module for watching filesystems changes. pyinotify
39bc47
can be used for various kind of fs monitoring. pyinotify relies on a
39bc47
recent Linux Kernel feature (merged in kernel 2.6.13) called
39bc47
inotify. inotify is an event-driven notifier, its notifications are
39bc47
exported from kernel space to user space.
39bc47
39bc47
This is the Python 3 build of pyinotify
39bc47
%endif # if with_python3
39bc47
39bc47
%prep
39bc47
%setup -q -n %{oname}-%{version}
39bc47
39bc47
%if 0%{?with_python3}
39bc47
%{__rm} -rf %{py3dir}
39bc47
cp -a . %{py3dir}
39bc47
%endif
39bc47
39bc47
%build
39bc47
%{__python} setup.py build
39bc47
39bc47
%if 0%{?with_python3}
39bc47
pushd %{py3dir}
39bc47
%{__python3} setup.py build
39bc47
popd
39bc47
%endif
39bc47
39bc47
%install
39bc47
%{__rm} -rf %{buildroot}
39bc47
39bc47
# Install python 3 first, so that python 2 gets precedence:
39bc47
%if 0%{?with_python3}
39bc47
pushd %{py3dir}
39bc47
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
39bc47
%{__install} -D -m 0755 -p %{SOURCE1} %{buildroot}%{_bindir}/python3-%{oname}
39bc47
%{__sed} -i -e 's/^python /python3 /' %{buildroot}%{_bindir}/python3-%{oname}
39bc47
%{__chmod} 0755 %{buildroot}%{python3_sitelib}/%{oname}.py
39bc47
popd
39bc47
%endif
39bc47
39bc47
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
39bc47
%{__install} -D -m 0755 -p %{SOURCE1} %{buildroot}%{_bindir}/%{oname}
39bc47
%{__chmod} 0755 %{buildroot}%{python_sitelib}/%{oname}.py
39bc47
39bc47
# examples
39bc47
%{__install} -d -m 0755 %{buildroot}%{_datadir}/%{oname}
39bc47
%{__cp} -a python2/examples/* %{buildroot}%{_datadir}/%{oname}
39bc47
39bc47
%clean
39bc47
%{__rm} -rf %{buildroot}
39bc47
39bc47
%files
39bc47
%defattr(-, root, root, -)
39bc47
%doc ACKS COPYING README.md
39bc47
%{_bindir}/%{oname}
39bc47
%{python_sitelib}/%{oname}*
39bc47
39bc47
%files examples
39bc47
%defattr(-, root, root, -)
39bc47
%{_datadir}/%{oname}
39bc47
39bc47
%if 0%{?with_python3}
39bc47
%files -n python3-inotify
39bc47
%defattr(-, root, root, -)
39bc47
%doc ACKS COPYING README.md
39bc47
%{_bindir}/python3-%{oname}
39bc47
%{python3_sitelib}/%{oname}*
39bc47
%if 0%{?fedora} > 14
39bc47
%{python3_sitelib}/__pycache__/%{oname}*
39bc47
%endif
39bc47
%endif
39bc47
39bc47
%changelog
97753a
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.9.4-4
97753a
- Mass rebuild 2013-12-27
97753a
39bc47
* Fri Feb 15 2013 Jakub Filak <jfilak@redhat.com> - 0.9.4-3
39bc47
- make with_python3 be conditional on fedora
39bc47
39bc47
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.4-2
39bc47
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
39bc47
39bc47
* Tue Dec 04 2012 Terje Rosten <terje.rosten@ntnu.no> - 0.9.4-1
39bc47
- 0.9.4
39bc47
39bc47
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 0.9.3-3
39bc47
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
39bc47
39bc47
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.3-2
39bc47
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
39bc47
39bc47
* Wed Feb 01 2012 Terje Rosten <terje.rosten@ntnu.no> - 0.9.3-1
39bc47
- 0.9.3
39bc47
39bc47
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.2-2
39bc47
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
39bc47
39bc47
* Mon May 02 2011 Terje Rosten <terje.rosten@ntnu.no> - 0.9.2-1
39bc47
- 0.9.2
39bc47
39bc47
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.1-2
39bc47
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
39bc47
39bc47
* Mon Feb 07 2011 Terje Rosten <terje.rosten@ntnu.no> - 0.9.1-1
39bc47
- 0.9.1
39bc47
39bc47
* Wed Aug 25 2010 Thomas Spura <tomspur@fedoraproject.org> - 0.9.0-3
39bc47
- rebuild with python3.2
39bc47
  http://lists.fedoraproject.org/pipermail/devel/2010-August/141368.html
39bc47
39bc47
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.9.0-2
39bc47
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
39bc47
39bc47
* Sat Jun 19 2010 Terje Rosten <terje.rosten@ntnu.no> - 0.9.0-1
39bc47
- 0.9.0
39bc47
- Add python 3 subpackage
39bc47
- License changed to MIT
39bc47
39bc47
* Sun Dec 06 2009 Terje Rosten <terje.rosten@ntnu.no> - 0.8.8-1
39bc47
- 0.8.8
39bc47
39bc47
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.6-2.git20090518
39bc47
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
39bc47
39bc47
* Mon May 18 2009 Terje Rosten <terje.rosten@ntnu.no> - 0.8.6-1.git20090518
39bc47
- Update to latest git, fixing bz #500934.
39bc47
39bc47
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.1-2.git20090208
39bc47
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
39bc47
39bc47
* Sat Feb  8 2009 Terje Rosten <terje.rosten@ntnu.no> - 0.8.1-1.git20090208
39bc47
- 0.8.1
39bc47
39bc47
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.8.0-4.r
39bc47
- Rebuild for Python 2.6
39bc47
39bc47
* Sun Jun 22 2008 Terje Rosten <terjeros@phys.ntnu.no> - 0.8.0-3.r
39bc47
- rebuild 
39bc47
39bc47
* Tue Jun 17 2008 Terje Rosten <terjeros@phys.ntnu.no> - 0.8.0-2.r
39bc47
- 0.8.0r
39bc47
- add wrapper in /usr/bin
39bc47
39bc47
* Mon Jun 16 2008 Terje Rosten <terjeros@phys.ntnu.no> - 0.8.0-1.q
39bc47
- 0.8.0q
39bc47
- Update url, license and source url
39bc47
39bc47
* Sat Feb  9 2008 Terje Rosten <terjeros@phys.ntnu.no> - 0.7.1-2
39bc47
- Rebuild
39bc47
39bc47
* Wed Aug 08 2007 Terje Rosten <terjeros@phys.ntnu.no> - 0.7.1-1
39bc47
- New upstream release: 0.7.1
39bc47
- Fix license tag
39bc47
39bc47
* Mon Jun 25 2007 Terje Rosten <terjeros@phys.ntnu.no> - 0.7.0-3
39bc47
- Remove autopath from example package (bz #237464)
39bc47
39bc47
* Tue Mar 27 2007 Terje Rosten <terjeros@phys.ntnu.no> - 0.7.0-2
39bc47
- Fix email address
39bc47
39bc47
* Tue Mar  6 2007 Terje Rosten <terjeros@phys.ntnu.no> - 0.7.0-1
39bc47
- Initial build
39bc47