2019-08-12 15:05:14 +00:00
|
|
|
#
|
2022-12-22 07:26:34 +00:00
|
|
|
# spec file
|
2019-08-12 15:05:14 +00:00
|
|
|
#
|
2023-05-27 21:35:55 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2019-08-12 15:05:14 +00: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.
|
|
|
|
|
2019-08-12 15:16:47 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2019-08-12 15:05:14 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2022-12-22 07:26:34 +00:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%define psuffix -test
|
|
|
|
%bcond_without test
|
|
|
|
%else
|
|
|
|
%define psuffix %{nil}
|
|
|
|
%bcond_with test
|
|
|
|
%endif
|
|
|
|
|
2019-08-12 15:16:47 +00:00
|
|
|
%define mod_name rq
|
2020-07-22 13:16:40 +00:00
|
|
|
%define skip_python2 1
|
2022-01-17 20:40:00 +00:00
|
|
|
|
2022-12-22 07:26:34 +00:00
|
|
|
Name: python-rq%{psuffix}
|
2023-05-27 21:35:55 +00:00
|
|
|
Version: 1.15
|
2019-08-12 15:05:14 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Easy Job Queues for Python
|
|
|
|
License: Apache-2.0
|
|
|
|
Group: Development/Languages/Python
|
2019-08-12 15:16:47 +00:00
|
|
|
URL: https://github.com/rq/rq
|
2022-01-17 20:40:00 +00:00
|
|
|
Source: https://github.com/rq/rq/archive/v%{version}/%{mod_name}-%{version}.tar.gz
|
2021-06-28 14:51:51 +00:00
|
|
|
BuildRequires: %{python_module click >= 5.0.0}
|
|
|
|
BuildRequires: %{python_module redis >= 3.5.0}
|
2019-08-12 15:05:14 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2019-08-12 15:16:47 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: psmisc
|
|
|
|
BuildRequires: python-rpm-macros
|
2020-06-11 04:25:31 +00:00
|
|
|
BuildRequires: redis
|
2021-06-28 14:51:51 +00:00
|
|
|
Requires: python-click >= 5.0.0
|
|
|
|
Requires: python-redis >= 3.5.0
|
2020-05-19 12:13:27 +00:00
|
|
|
Requires(post): update-alternatives
|
2021-06-28 14:51:51 +00:00
|
|
|
Requires(postun):update-alternatives
|
2022-12-22 08:22:00 +00:00
|
|
|
BuildArch: noarch
|
2022-12-22 07:26:34 +00:00
|
|
|
|
|
|
|
%if %{with test}
|
|
|
|
BuildRequires: %{python_module %{mod_name} = %{version}}
|
|
|
|
BuildRequires: %{python_module psutil}
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
BuildRequires: %{python_module sentry-sdk}
|
|
|
|
%endif
|
|
|
|
|
2019-08-12 15:05:14 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
RQ (Redis Queue) is a simple Python library for queueing jobs and processing
|
2019-08-24 07:41:09 +00:00
|
|
|
them in the background with workers. It is backed by Redis. It can be
|
|
|
|
integrated into web stacks.
|
2019-08-12 15:05:14 +00:00
|
|
|
|
|
|
|
%prep
|
2022-12-22 07:26:34 +00:00
|
|
|
%autosetup -p1 -n %{mod_name}-%{version}
|
2019-08-12 15:05:14 +00:00
|
|
|
|
2022-12-22 07:26:34 +00:00
|
|
|
%if !%{with test}
|
2019-08-12 15:05:14 +00:00
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
2020-05-19 12:13:27 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/rq
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/rqinfo
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/rqworker
|
2019-08-12 15:16:47 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2022-12-22 07:26:34 +00:00
|
|
|
%endif
|
2019-08-12 15:16:47 +00:00
|
|
|
|
2022-12-22 07:26:34 +00:00
|
|
|
%if %{with test}
|
2019-08-12 15:16:47 +00:00
|
|
|
%check
|
|
|
|
export PATH="$PATH:%{buildroot}%{_bindir}"
|
|
|
|
%{_sbindir}/redis-server --port 6379 &
|
2022-12-05 17:52:16 +00:00
|
|
|
%pytest
|
2019-08-12 15:16:47 +00:00
|
|
|
killall redis-server
|
2022-12-22 07:26:34 +00:00
|
|
|
%endif
|
2019-08-12 15:05:14 +00:00
|
|
|
|
2022-12-22 07:26:34 +00:00
|
|
|
%if !%{with test}
|
2020-05-19 12:13:27 +00:00
|
|
|
%post
|
|
|
|
%python_install_alternative rq
|
|
|
|
%python_install_alternative rqinfo
|
|
|
|
%python_install_alternative rqworker
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative rq
|
|
|
|
%python_uninstall_alternative rqinfo
|
|
|
|
%python_uninstall_alternative rqworker
|
|
|
|
|
2019-08-12 15:05:14 +00:00
|
|
|
%files %{python_files}
|
2019-08-12 15:16:47 +00:00
|
|
|
%doc README.md CHANGES.md
|
|
|
|
%license LICENSE
|
2022-12-22 07:26:34 +00:00
|
|
|
%{python_sitelib}/rq
|
|
|
|
%{python_sitelib}/rq-%{version}*-info
|
2020-05-19 12:13:27 +00:00
|
|
|
%python_alternative %{_bindir}/rq
|
|
|
|
%python_alternative %{_bindir}/rqinfo
|
|
|
|
%python_alternative %{_bindir}/rqworker
|
2022-12-22 07:26:34 +00:00
|
|
|
%endif
|
2019-08-12 15:05:14 +00:00
|
|
|
|
|
|
|
%changelog
|