2012-01-31 14:37:58 +01:00
|
|
|
#
|
|
|
|
# spec file for package python-watchdog
|
|
|
|
#
|
2023-01-02 11:18:32 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2012-01-31 14:37:58 +01:00
|
|
|
#
|
|
|
|
# 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.
|
2016-03-14 16:26:02 +01:00
|
|
|
|
2018-11-19 20:32:40 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-01-31 14:37:58 +01:00
|
|
|
#
|
|
|
|
|
2016-03-14 16:26:02 +01:00
|
|
|
|
2021-10-16 11:18:26 +02:00
|
|
|
%{?!python_module:%define python_module() python3-%{**}}
|
2021-01-13 09:50:19 +01:00
|
|
|
%define skip_python2 1
|
2012-01-31 14:37:58 +01:00
|
|
|
Name: python-watchdog
|
2023-01-02 11:18:32 +01:00
|
|
|
Version: 2.2.1
|
2012-01-31 14:37:58 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Filesystem events monitoring
|
2017-08-04 21:12:42 +02:00
|
|
|
License: Apache-2.0
|
2019-11-06 14:44:41 +01:00
|
|
|
URL: https://github.com/gorakhargosh/watchdog
|
2017-08-03 23:27:51 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/w/watchdog/watchdog-%{version}.tar.gz
|
2021-05-17 13:26:43 +02:00
|
|
|
BuildRequires: %{python_module flaky}
|
2017-05-16 15:55:44 +02:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
BuildRequires: python3-Sphinx
|
2020-07-22 14:39:15 +02:00
|
|
|
Requires: python-PyYAML >= 3.10
|
2020-03-10 12:16:55 +01:00
|
|
|
Requires: python-pathtools >= 0.1.1
|
2020-05-18 10:12:07 +02:00
|
|
|
Requires(post): update-alternatives
|
2021-05-17 13:23:30 +02:00
|
|
|
Requires(postun):update-alternatives
|
2012-01-31 14:37:58 +01:00
|
|
|
BuildArch: noarch
|
2021-01-13 09:50:19 +01:00
|
|
|
# SECTION test requirements
|
|
|
|
BuildRequires: %{python_module pathtools >= 0.1.1}
|
|
|
|
BuildRequires: %{python_module pytest-timeout}
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
# /SECTION test
|
2017-05-16 15:55:44 +02:00
|
|
|
%python_subpackages
|
2012-01-31 14:37:58 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Python API and shell utilities to monitor file system events.
|
|
|
|
|
2017-05-16 15:55:44 +02:00
|
|
|
%package doc
|
|
|
|
Summary: Documentation and examples for %{name}
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
This package contains documentation and examples for %{name}.
|
|
|
|
|
2012-01-31 14:37:58 +01:00
|
|
|
%prep
|
|
|
|
%setup -q -n watchdog-%{version}
|
2016-03-14 16:26:02 +01:00
|
|
|
chmod -x README.rst
|
2017-05-16 15:55:44 +02:00
|
|
|
# Remove all shebangs
|
|
|
|
find src -name "*.py" | xargs sed -i -e '/^#!\//, 1d'
|
2012-01-31 14:37:58 +01:00
|
|
|
|
|
|
|
%build
|
2017-05-16 15:55:44 +02:00
|
|
|
%python_build
|
|
|
|
cd docs && make html && rm -r build/html/.buildinfo build/html/objects.inv # Build HTML docs
|
2012-01-31 14:37:58 +01:00
|
|
|
|
|
|
|
%install
|
2017-05-16 15:55:44 +02:00
|
|
|
%python_install
|
2020-05-18 10:12:07 +02:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/watchmedo
|
2018-08-09 12:18:50 +02:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2017-05-16 15:55:44 +02:00
|
|
|
|
|
|
|
%check
|
2020-03-10 12:16:55 +01:00
|
|
|
sed -i '/--cov/d' setup.cfg
|
|
|
|
export LANG=en_US.UTF-8
|
2020-06-03 09:50:56 +02:00
|
|
|
# test_event_dispatcher randomly fails on SLE15
|
2022-07-23 13:36:22 +02:00
|
|
|
# test_unmount_watched_directory_filesystem requires sudo/root which is not available
|
|
|
|
%pytest -k 'not test_event_dispatcher and not test_unmount_watched_directory_filesystem'
|
2017-05-16 15:55:44 +02:00
|
|
|
|
2020-05-18 10:12:07 +02:00
|
|
|
%post
|
|
|
|
%python_install_alternative watchmedo
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative watchmedo
|
|
|
|
|
2017-05-16 15:55:44 +02:00
|
|
|
%files %{python_files}
|
2018-08-09 12:18:50 +02:00
|
|
|
%license COPYING LICENSE
|
|
|
|
%doc AUTHORS changelog.rst MANIFEST.in README.rst
|
2020-05-18 10:12:07 +02:00
|
|
|
%python_alternative %{_bindir}/watchmedo
|
2017-05-16 15:55:44 +02:00
|
|
|
%{python_sitelib}/watchdog
|
|
|
|
%{python_sitelib}/watchdog-%{version}-py%{python_version}.egg-info
|
2012-01-31 14:37:58 +01:00
|
|
|
|
2017-05-16 15:55:44 +02:00
|
|
|
%files %{python_files doc}
|
|
|
|
%doc docs/build/html
|
2012-01-31 14:37:58 +01:00
|
|
|
|
|
|
|
%changelog
|