Inport from SF packaging and bump to 3.6.3 (#1813957)

This commit is contained in:
Fabien Boucher 2020-03-18 14:57:35 +00:00
commit 72979fa85c
3 changed files with 50 additions and 57 deletions

View file

@ -1,84 +1,76 @@
%global pypi_name APScheduler
Name: python-%{pypi_name}
Version: 3.5.3
Release: 4%{?dist}
Summary: In-process task scheduler with Cron-like capabilities
License: MIT
URL: https://pypi.python.org/pypi/%{pypi_name}
Source0: https://pypi.python.org/packages/source/A/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-setuptools_scm
BuildRequires: python3-six >= 1.4.0
BuildRequires: python3-tzlocal
# Unit testing
BuildRequires: python3-mock
BuildRequires: python3-pytest
BuildRequires: python3-pytest-cov
BuildRequires: python3-pytest-asyncio
BuildRequires: python3-pytest-tornado
BuildRequires: python3-tornado
%description
%global srcname APScheduler
%global _description %{expand:
Advanced Python Scheduler (APScheduler) is a Python library that lets you
schedule your Python code to be executed later, either just once or
periodically.
periodically. You can add new jobs or remove old ones on the fly as you
please. If you store your jobs in a database, they will also survive
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.}
%package -n python3-%{pypi_name}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{pypi_name}}
Name: python-APScheduler
Version: 3.6.3
Release: 1%{?dist}
Summary: In-process task scheduler with Cron-like capabilities
Requires: python3-six >= 1.4.0
Requires: python3-tzlocal
License: MIT
URL: http://pythonhosted.org/APScheduler/
Source0: %pypi_source
%description -n python3-%{pypi_name}
Advanced Python Scheduler (APScheduler) is a Python library that lets you
schedule your Python code to be executed later, either just once or
periodically.
BuildArch: noarch
%package doc
Summary: Documentation of the Advanced Python Scheduler library
BuildRequires: python3-sphinx
%description %_description
%description doc
Documentation of the Advanced Python Scheduler library.
%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
%prep
%autosetup -n %{pypi_name}-%{version}
rm -rf %{pypi_name}.egg-info
%autosetup -n %{srcname}-%{version} -p1
# Remove that test as it require services (redis, zookeeper, ...)
# up and running. Upstream provides a docker compose to spawn
# services before running these tests.
rm tests/test_jobstores.py
%build
%py3_build
## generate html docs
%{__python3} setup.py build_sphinx
rm -rf docs/_build/html/.{doctrees,buildinfo} docs/_build/html/objects.inv
%install
%py3_install
%check
# Default timezone to UTC otherwise unit tests fail.
export TZ=UTC
# TestBaseScheduler.test_create_trigger_bad_plugin_type does incorrect mocking
# TestIntervalTrigger.test_repr - changed timedelta repr in Python 3.7
# both fixed upstream
%{__python3} -m pytest -k "not (TestIntervalTrigger and test_repr) and not test_create_trigger_bad_plugin_type"
%{python3} -m pytest -s tests
%files -n python3-%{pypi_name}
%files -n python3-%{srcname}
%license LICENSE.txt
%doc README.rst
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/
%{python3_sitelib}/%{srcname}-*.egg-info/
%{python3_sitelib}/apscheduler/
%files doc
%doc docs/_build/html
%changelog
* Wed Mar 11 2020 Fabien Boucher <fboucher@redhat.com> - 3.6.3-1
- Inport from SF packaging and bump to 3.6.3 (#1813957)
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 3.5.3-4
- Rebuilt for Python 3.8