From f6b6df04361cbd585755a36beebfbc9f72434705 Mon Sep 17 00:00:00 2001 From: Maja Massarini Date: Fri, 3 Nov 2023 11:37:15 +0100 Subject: [PATCH] New specfile for unretirement procedure --- .packit.yaml | 16 ++++++++++++++ python-APScheduler.spec | 48 ++++++++++++++++------------------------- 2 files changed, 35 insertions(+), 29 deletions(-) create mode 100644 .packit.yaml diff --git a/.packit.yaml b/.packit.yaml new file mode 100644 index 0000000..8582aea --- /dev/null +++ b/.packit.yaml @@ -0,0 +1,16 @@ +# See the documentation for more information: +# https://packit.dev/docs/configuration/ + +specfile_path: python-APScheduler.spec + +upstream_package_name: APScheduler +downstream_package_name: python-APScheduler +upstream_project_url: https://github.com/agronholm/apscheduler + +jobs: + - job: copr_build + owner: mmassari + project: apscheduler + trigger: pull_request + targets: + - fedora-f38 diff --git a/python-APScheduler.spec b/python-APScheduler.spec index d9ebfae..9a9e24a 100644 --- a/python-APScheduler.spec +++ b/python-APScheduler.spec @@ -8,15 +8,14 @@ scheduler restarts and maintain their state. When the scheduler is restarted, it will then run all the jobs it should have run while it was offline.} -Name: python-APScheduler -Version: 3.8.0 +Name: python-%{srcname} +Version: 3.10.4 Release: %autorelease Summary: In-process task scheduler with Cron-like capabilities License: MIT -URL: https://github.com/agronholm/apscheduler -Source0: %pypi_source - +URL: https://pypi.org/project/APScheduler/ +Source0: %{pypi_source %{srcname}} BuildArch: noarch %description %_description @@ -24,22 +23,6 @@ BuildArch: noarch %package -n python3-%{srcname} Summary: %{summary} BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-setuptools_scm -BuildRequires: python3-pytest -BuildRequires: python3-pytest-asyncio -BuildRequires: python3-pytest-tornado -BuildRequires: python3-pytest-cov -BuildRequires: python3-tornado -BuildRequires: python3-twisted -BuildRequires: python3-redis -BuildRequires: python3-kazoo -BuildRequires: python3-gevent -BuildRequires: python3-sqlalchemy -BuildRequires: python3-pymongo -BuildRequires: python3-pytz -BuildRequires: python3-tzlocal -%{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{srcname} %_description @@ -49,23 +32,30 @@ BuildRequires: python3-tzlocal # up and running. Upstream provides a docker compose to spawn # services before running these tests. rm tests/test_jobstores.py +sed -i 's/pytest-tornado5/pytest-tornado/' setup.py +# Remove coverage +sed -i 's/addopts = -rsx --cov/addopts = -rsx/' setup.cfg +sed -i '/pytest-cov/d' setup.py +# It is in the tarball and is not used +rm -r APScheduler.egg-info + +%generate_buildrequires +%pyproject_buildrequires -x testing -x tornado %build -%py3_build +%pyproject_wheel %install -%py3_install +%pyproject_install +%pyproject_save_files apscheduler %check # Default timezone to UTC otherwise unit tests fail. export TZ=UTC -%{python3} -m pytest -s tests +%pytest -%files -n python3-%{srcname} -%license LICENSE.txt +%files -n python3-%{srcname} -f %{pyproject_files} %doc README.rst -%{python3_sitelib}/%{srcname}-*.egg-info/ -%{python3_sitelib}/apscheduler/ %changelog -%autochangelog +%autochangelog \ No newline at end of file