From b9806c487e1b87718e9e655b5c5f19661327e1366d0bbb733b09d3f2d347ff25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Thu, 12 Jun 2025 09:21:14 +0000 Subject: [PATCH] - Convert to pip-based build OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-schedule?expand=0&rev=15 --- .gitattributes | 23 ++++++++ .gitignore | 1 + python-schedule-no-mock.patch | 17 ++++++ python-schedule.changes | 99 +++++++++++++++++++++++++++++++++++ python-schedule.spec | 63 ++++++++++++++++++++++ schedule-1.1.0.tar.gz | 3 ++ 6 files changed, 206 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 python-schedule-no-mock.patch create mode 100644 python-schedule.changes create mode 100644 python-schedule.spec create mode 100644 schedule-1.1.0.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/python-schedule-no-mock.patch b/python-schedule-no-mock.patch new file mode 100644 index 0000000..41c5b15 --- /dev/null +++ b/python-schedule-no-mock.patch @@ -0,0 +1,17 @@ +Index: schedule-1.1.0/test_schedule.py +=================================================================== +--- schedule-1.1.0.orig/test_schedule.py 2021-03-07 11:49:24.000000000 +0100 ++++ schedule-1.1.0/test_schedule.py 2021-09-08 10:48:44.066906764 +0200 +@@ -1,8 +1,11 @@ + """Unit tests for schedule.py""" + import datetime + import functools +-import mock + import unittest ++try: ++ import unittest.mock as mock ++except ImportError: ++ import mock + + # Silence "missing docstring", "method could be a function", + # "class already defined", and "too many public methods" messages: diff --git a/python-schedule.changes b/python-schedule.changes new file mode 100644 index 0000000..10d59c6 --- /dev/null +++ b/python-schedule.changes @@ -0,0 +1,99 @@ +------------------------------------------------------------------- +Thu Jun 12 09:21:01 UTC 2025 - Markéta Machová + +- Convert to pip-based build + +------------------------------------------------------------------- +Fri Mar 4 08:04:55 UTC 2022 - pgajdos@suse.com + +- disable flaky test_until_time + +------------------------------------------------------------------- +Mon Nov 8 12:18:51 UTC 2021 - Dirk Müller + +- skip python 2.7 build + +------------------------------------------------------------------- +Thu Sep 9 11:43:19 UTC 2021 - Matej Cepl + +- Use %autosetup macro instead + +------------------------------------------------------------------- +Wed Sep 8 08:54:38 UTC 2021 - pgajdos@suse.com + +- version update to 1.1.0 + 1.1.0 (2021-04-09) + ++++++++++++++++++ + - Added @repeat() decorator. See #148. Thanks @rhagenaars! + - Added execute .until(). See #195. Thanks @fredthomsen! + - Added job retrieval filtered by tags using get_jobs('tag'). See #419. Thanks @skenvy! + - Added type annotations. See #427. Thanks @martinthoma! + - Bugfix: str() of job when there is no __name__. See #430. Thanks @biggerfisch! + - Improved error messages. See #280, #439. Thanks @connorskees and @sosolidkk! + - Improved logging. See #193. Thanks @zcking! + - Documentation improvements and fix typos. See #424, #435, #436, #453, #437, #448. Thanks @ebllg! + 1.0.0 (2021-01-20) + ++++++++++++++++++ + Depending on your configuration, the following bugfixes might change schedule's behaviour: + - Fix: idle_seconds crashes when no jobs are scheduled. See #401. Thanks @yoonghm! + - Fix: day.at('HH:MM:SS') where HMS=now+10s doesn't run today. See #331. Thanks @qmorek! + - Fix: hour.at('MM:SS'), the seconds are set to 00. See #290. Thanks @eladbi! + - Fix: Long-running jobs skip a day when they finish in the next day #404. Thanks @4379711! + Other changes: + - Dropped Python 2.7 and 3.5 support, added 3.8 and 3.9 support. See #409 + - Fix RecursionError when the job is passed to the do function as an arg. See #190. Thanks @connorskees! + - Fix DeprecationWarning of 'collections'. See #296. Thanks @gaguirregabiria! + - Replaced Travis with Github Actions for automated testing + - Revamp and extend documentation. See #395 + - Improved tests. Thanks @connorskees and @Jamim! + - Changed log messages to DEBUG level. Thanks @aisk! + - added patches + fix https://github.com/dbader/schedule/issues/484 + + python-schedule-no-mock.patch + +------------------------------------------------------------------- +Tue Mar 26 16:40:26 UTC 2019 - pgajdos@suse.com + +- version update to 0.6.0 + * Make at() accept timestamps with 1 second precision (#267). + * Introduce proper exception hierarchy (#271). + +------------------------------------------------------------------- +Tue Dec 18 23:39:12 UTC 2018 - Jan Engelhardt + +- Replace filler wording from description. + +------------------------------------------------------------------- +Tue Dec 4 12:54:16 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Wed May 16 15:35:22 UTC 2018 - toddrme2178@gmail.com + +- Update to version 0.5.0 + * Keep partially scheduled jobs from breaking the scheduler (#125) + * Add support for random intervals (Thanks @grampajoe and @gilbsgilbs) +- Update to version 0.4.3 + * Improve docs & clean up docstrings +- Update to version 0.4.2 + * Publish to PyPI as a universal (py2/py3) wheel +- Update to version 0.4.0 + * Add proper HTML (Sphinx) docs available at https://schedule.readthedocs.io/ + * CI builds now run against Python 2.7 and 3.5 (3.3 and 3.4 should work fine but are untested) + * Fixed an issue with ``run_all()`` and having more than one job that deletes itself in the same iteration. Thanks @alaingilbert. + * Add ability to tag jobs and to cancel jobs by tag. Thanks @Zerrossetto. + * Improve schedule docs. Thanks @Zerrossetto. + * Additional docs fixes by @fkromer and @yetingsky. +- Implement single-spec version + +------------------------------------------------------------------- +Tue Jan 19 19:40:31 UTC 2016 - hpj@urpla.net + +- reduce log level from info to debug + +------------------------------------------------------------------- +Tue Jan 19 15:34:57 UTC 2016 - hpj@urpla.net + +- version 0.3.2: initial build + diff --git a/python-schedule.spec b/python-schedule.spec new file mode 100644 index 0000000..f2836e3 --- /dev/null +++ b/python-schedule.spec @@ -0,0 +1,63 @@ +# +# spec file for package python-schedule +# +# Copyright (c) 2025 SUSE LLC +# +# 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 https://bugs.opensuse.org/ +# + + +Name: python-schedule +Version: 1.1.0 +Release: 0 +Summary: Job scheduling module for Python +License: MIT +Group: Development/Languages/Python +URL: https://github.com/dbader/schedule +Source: https://files.pythonhosted.org/packages/source/s/schedule/schedule-%{version}.tar.gz +# https://github.com/dbader/schedule/issues/484 +Patch0: python-schedule-no-mock.patch +BuildRequires: %{python_module pip} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildArch: noarch +%python_subpackages + +%description +An in-process scheduler for periodic jobs that uses the builder +pattern for configuration. Schedule lets the user run Python functions +(or any other callable) periodically at pre-determined intervals. + +%prep +%autosetup -p1 -n schedule-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +# test_until_time: https://github.com/dbader/schedule/issues/488 +%pytest -k 'not test_until_time' + +%files %{python_files} +%doc README.rst +%license LICENSE.txt +%{python_sitelib}/schedule +%{python_sitelib}/schedule-%{version}*-info + +%changelog diff --git a/schedule-1.1.0.tar.gz b/schedule-1.1.0.tar.gz new file mode 100644 index 0000000..4c8eff5 --- /dev/null +++ b/schedule-1.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e6ca13585e62c810e13a08682e0a6a8ad245372e376ba2b8679294f377dfc8e4 +size 18290