96f9b34
%global modname watchdog
96f9b34
c056541
Name:               python-%{modname}
c056541
Version:            0.8.3
c056541
Release:            1%{?dist}
96f9b34
Summary:            File system events monitoring
96f9b34
96f9b34
License:            ASL 2.0 and BSD and MIT
c056541
URL:                http://pypi.python.org/pypi/%{modname}
96f9b34
Source0:            http://pypi.python.org/packages/source/w/%{modname}/%{modname}-%{version}.tar.gz
96f9b34
BuildArch:          noarch
96f9b34
c056541
%description
c056541
A Python API and shell utilities to monitor file system events.
c056541
c056541
c056541
%package -n python2-%{modname}
c056541
BuildArch:          noarch
96f9b34
BuildRequires:      python2-devel
96f9b34
BuildRequires:      pytest
96f9b34
BuildRequires:      python-pytest-cov
96f9b34
BuildRequires:      PyYAML >= 3.09
c056541
BuildRequires:      python2-argh >= 0.8.1
c056541
Requires:           python-pathtools >= 0.1.1
c056541
Requires:           PyYAML >= 3.09
c056541
Requires:           python2-argh >= 0.8.1
c056541
Requires:           python-pathtools >= 0.1.1
c056541
Summary:            %{summary}
c056541
%{?python_provide:%python_provide python2-%{modname}}
c056541
c056541
%description -n python2-%{modname}
c056541
A Python API and shell utilities to monitor file system events.
c056541
96f9b34
c056541
%package -n python3-%{modname}
c056541
BuildArch:          noarch
96f9b34
BuildRequires:      python3-devel
96f9b34
BuildRequires:      python3-pytest
96f9b34
BuildRequires:      python3-pytest-cov
96f9b34
BuildRequires:      python3-PyYAML >= 3.09
96f9b34
BuildRequires:      python3-argh >= 0.8.1
96f9b34
BuildRequires:      python3-pathtools >= 0.1.1
c056541
Requires:           python3-PyYAML >= 3.09
c056541
Requires:           python3-argh >= 0.8.1
c056541
Requires:           python3-pathtools >= 0.1.1
c056541
Summary:            %{summary}
c056541
%{?python_provide:%python_provide python3-%{modname}}
96f9b34
c056541
%description -n python3-%{modname}
96f9b34
A Python API and shell utilities to monitor file system events.
96f9b34
96f9b34
96f9b34
%prep
96f9b34
%setup -q -n %{modname}-%{version}
96f9b34
96f9b34
# Remove all shebangs
96f9b34
find src -name "*.py" | xargs sed -i -e '/^#!\//, 1d'
96f9b34
96f9b34
# Remove +x of the README file
96f9b34
chmod -x README.rst
96f9b34
96f9b34
# Remove bundled egg-info in case it exists
96f9b34
rm -rf %{modname}.egg-info
c056541
96f9b34
96f9b34
%build
c056541
%py3_build
c056541
%py2_build
96f9b34
96f9b34
96f9b34
%install
c056541
%py3_install
c056541
pushd %{buildroot}%{_bindir}
c056541
mv watchmedo watchmedo-%{python3_version}
c056541
ln -s watchmedo-%{python3_version} watchmedo-3
c056541
ln -s watchmedo-%{python3_version} watchmedo-py3
c056541
popd
c056541
c056541
%py2_install
c056541
pushd %{buildroot}%{_bindir}
c056541
mv watchmedo watchmedo-%{python2_version}
c056541
ln -s watchmedo-%{python2_version} watchmedo-2
c056541
ln -s watchmedo-%{python2_version} watchmedo
96f9b34
popd
c056541
96f9b34
96f9b34
%check
c056541
# Cannot launch test until https://pypi.python.org/pypi/pytest-timeout is packaged
c056541
# %%{__python2} setup.py test
c056541
# %%{__python3} setup.py test
c056541
c056541
c056541
%files -n python2-watchdog
c056541
%doc README.rst
c056541
%license LICENSE
96f9b34
%{python2_sitelib}/%{modname}/
96f9b34
%{python2_sitelib}/%{modname}-%{version}*
c056541
%exclude %{_bindir}/watchmedo-*3*
c056541
%{_bindir}/watchmedo*
96f9b34
c056541
c056541
%files -n python3-%{modname}
c056541
%doc README.rst
c056541
%license LICENSE
96f9b34
%{python3_sitelib}/%{modname}/
96f9b34
%{python3_sitelib}/%{modname}-%{version}-*
c056541
%{_bindir}/watchmedo-3*
96f9b34
96f9b34
96f9b34
%changelog
c056541
* Thu Aug 11 2016 Julien Enselme <jujens@jujens.eu> - 0.8.3-1
c056541
- Update to 0.8.3
c056541
- Correct requires
c056541
- Update to follow new Python packaging guidelines
c056541
- Always build with Python 3
c056541
ac614b6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.2-5
ac614b6
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
ac614b6
7315223
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.2-4
7315223
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
7315223
c457332
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.2-3
c457332
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
c457332
34a5b73
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.2-2
34a5b73
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
34a5b73
84276a3
* Sat Nov 22 2014 Pierre-Yves Chibon <pingou@pingoured.fr> - 0.8.2-1
84276a3
- Update to 0.8.2
84276a3
96f9b34
* Fri Apr 25 2014 Pierre-Yves Chibon <pingou@pingoured.fr> - 0.7.1-4
96f9b34
- Adjust the license tag to ASL2.0 and BSD and MIT
96f9b34
96f9b34
* Fri Apr 18 2014 Pierre-Yves Chibon <pingou@pingoured.fr> - 0.7.1-3
96f9b34
- Adjust the check for Fedora/RHEL release number for the py3 package
96f9b34
96f9b34
* Fri Apr 18 2014 Pierre-Yves Chibon <pingou@pingoured.fr> - 0.7.1-2
96f9b34
- Remove all shebang of the python files
96f9b34
96f9b34
* Fri Apr 18 2014 Pierre-Yves Chibon <pingou@pingoured.fr> - 0.7.1-1
96f9b34
- initial package for Fedora