Blob Blame History Raw
%global srcname rq
%bcond_without tests

Name:           python-%{srcname}
Version:        1.12.0
Release:        1%{?dist}
Summary:        Simple, lightweight, library for creating background jobs, and processing them

License:        BSD-2-Clause
URL:            https://python-rq.org
Source:         https://github.com/rq/rq/archive/v%{version}/%{srcname}-%{version}.tar.gz

BuildArch:      noarch

BuildRequires:  python3-click
BuildRequires:  python3-devel
BuildRequires:	python3-redis
BuildRequires:  python3dist(setuptools)
%if %{with tests}
BuildRequires:	python3-pytest
BuildRequires:	python3-psutil
BuildRequires:	redis
%endif
Requires:  python3-click
Requires:  python3-redis

%global _description %{expand:
RQ (Redis Queue) is a simple Python library for queueing jobs
and processing them in the background with workers.
It is backed by Redis and it is designed to have a low barrier to entry.
It should be integrated in your web stack easily.}

%description %{_description}

%package     -n python3-%{srcname}
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname} %{_description}

Python 3 version.

%prep
%autosetup -n %{srcname}-%{version} -p1

%build
%py3_build

%install
%py3_install

%check
%if %{with tests}
%{_bindir}/redis-server --bind 127.0.0.1 --port 6379 --daemonize yes &
# no python3-sentry-sdk in EPEL9
%pytest -v -k 'not test_failure_capture'
%{_libexecdir}/redis-shutdown
%endif

%files -n python3-%{srcname}
%license LICENSE
%doc README.md
%{_bindir}/rq
%{_bindir}/rqinfo
%{_bindir}/rqworker
%{python3_sitelib}/rq-*.egg-info/
%{python3_sitelib}/rq/

%changelog
* Mon Jan 23 2023 Ali Erdinc Koroglu <aekoroglu@fedoraproject.org> - 1.12.0-1
- Update to 1.12.0 (RHBZ #2163133 and #2163190)

* Sat Dec 12 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.7.0-1
- Update to 1.7.0

* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

* Tue May 26 2020 Miro HronĨok <mhroncok@redhat.com> - 1.2.2-2
- Rebuilt for Python 3.9

* Fri Jan 31 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.2.2-1
- Update to 1.2.2

* Fri Jan 31 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 1.2.1-1
- Update to 1.2.1

* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

* Fri Sep 06 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.1.0-1
- Initial package