2011-07-08 15:21:12 +02:00
|
|
|
#
|
2021-07-07 10:43:45 +02:00
|
|
|
# spec file
|
2011-07-08 15:21:12 +02:00
|
|
|
#
|
2023-04-21 16:33:42 +02:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2011-07-08 15:21:12 +02: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.
|
2012-03-22 19:10:28 +01:00
|
|
|
|
2018-10-18 12:07:32 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-07-08 15:21:12 +02:00
|
|
|
#
|
|
|
|
|
2012-03-22 19:10:28 +01:00
|
|
|
|
2021-07-07 10:43:45 +02:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%define psuffix -test
|
|
|
|
%bcond_without test
|
|
|
|
%else
|
|
|
|
%define psuffix %{nil}
|
|
|
|
%bcond_with test
|
|
|
|
%endif
|
2020-04-09 19:32:48 +02:00
|
|
|
%define skip_python2 1
|
2023-04-21 16:33:42 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2021-07-07 10:43:45 +02:00
|
|
|
Name: python-gunicorn%{psuffix}
|
2021-06-29 10:57:01 +02:00
|
|
|
Version: 20.1.0
|
2011-09-23 15:00:33 +02:00
|
|
|
Release: 0
|
2012-03-10 17:09:05 +01:00
|
|
|
Summary: WSGI HTTP Server for UNIX
|
2012-03-22 19:10:28 +01:00
|
|
|
License: MIT
|
2011-09-23 15:00:33 +02:00
|
|
|
Group: Development/Languages/Python
|
2020-04-09 19:32:48 +02:00
|
|
|
URL: https://gunicorn.org
|
2017-07-10 16:10:14 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/g/gunicorn/gunicorn-%{version}.tar.gz
|
2021-11-19 00:16:12 +01:00
|
|
|
Patch0: support-eventlet-30-3.patch
|
2020-04-09 19:32:48 +02:00
|
|
|
BuildRequires: %{python_module setuptools >= 3.0}
|
2013-06-17 14:51:27 +02:00
|
|
|
BuildRequires: fdupes
|
2017-07-10 16:10:14 +02:00
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
BuildRequires: python3-Sphinx
|
2021-07-07 10:43:45 +02:00
|
|
|
%if %{with test}
|
|
|
|
BuildRequires: %{python_module eventlet}
|
|
|
|
BuildRequires: %{python_module gevent >= 1.4}
|
|
|
|
BuildRequires: %{python_module gunicorn}
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
%endif
|
2020-04-09 19:32:48 +02:00
|
|
|
Requires: python-setuptools >= 3.0
|
2017-07-10 16:10:14 +02:00
|
|
|
Requires(post): update-alternatives
|
2021-07-07 10:43:45 +02:00
|
|
|
Requires(postun):update-alternatives
|
2021-06-29 11:19:31 +02:00
|
|
|
Suggests: python-evenlet
|
|
|
|
Suggests: python-gevent
|
|
|
|
Suggests: python-gthread
|
|
|
|
Suggests: python-setproctitle
|
|
|
|
Suggests: python-tornado
|
2011-09-23 15:00:33 +02:00
|
|
|
BuildArch: noarch
|
2017-07-10 16:10:14 +02:00
|
|
|
%python_subpackages
|
2011-07-06 12:36:04 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
Gunicorn 'Green Unicorn' is a Python WSGI HTTP Server for UNIX. It's a pre-fork
|
|
|
|
worker model ported from Ruby's Unicorn_ project. The Gunicorn server is broadly
|
2017-07-11 14:41:39 +02:00
|
|
|
compatible with various web frameworks.
|
2011-07-06 12:36:04 +02:00
|
|
|
|
2023-05-03 16:41:44 +02:00
|
|
|
%if 0%{?suse_version} > 1500
|
2017-07-10 16:10:14 +02:00
|
|
|
%package -n python-gunicorn-doc
|
|
|
|
Summary: Documentation for %{name}
|
2011-07-06 12:36:04 +02:00
|
|
|
Group: Documentation/Other
|
2017-07-10 16:10:14 +02:00
|
|
|
Provides: %{python_module gunicorn-doc = %{version}}
|
2011-07-06 12:36:04 +02:00
|
|
|
|
2017-07-10 16:10:14 +02:00
|
|
|
%description -n python-gunicorn-doc
|
|
|
|
Gunicorn 'Green Unicorn' is a Python WSGI HTTP Server for UNIX. It's a pre-fork
|
|
|
|
worker model ported from Ruby's Unicorn_ project. The Gunicorn server is broadly
|
2017-07-11 14:41:39 +02:00
|
|
|
compatible with various web frameworks.
|
2017-07-10 16:10:14 +02:00
|
|
|
|
|
|
|
This package contains the documentation.
|
2023-05-03 16:41:44 +02:00
|
|
|
%endif
|
2011-07-06 12:36:04 +02:00
|
|
|
|
|
|
|
%prep
|
2011-09-23 15:00:33 +02:00
|
|
|
%setup -q -n gunicorn-%{version}
|
2015-05-07 13:57:54 +02:00
|
|
|
# remove version pinning for test requirements
|
|
|
|
sed -i 's/==.*//' requirements_test.txt
|
2018-10-18 12:07:32 +02:00
|
|
|
sed -i -e '/cover/d' requirements_test.txt
|
2020-12-04 13:35:24 +01:00
|
|
|
# do not check coverage
|
|
|
|
sed -i -e 's/--cov[^ ]*//' -e 's/--cov-report[^ ]*//' setup.cfg
|
2021-11-19 00:16:12 +01:00
|
|
|
%autopatch -p1
|
2011-07-06 12:36:04 +02:00
|
|
|
|
2021-07-07 10:43:45 +02:00
|
|
|
%if %{with test}
|
|
|
|
%check
|
|
|
|
%pytest
|
|
|
|
|
|
|
|
%else # without test
|
|
|
|
|
2011-07-06 12:36:04 +02:00
|
|
|
%build
|
2017-07-10 16:10:14 +02:00
|
|
|
%python_build
|
|
|
|
sphinx-build -b html -d docs/build/doctrees docs/source docs/build/html
|
2011-07-06 12:36:04 +02:00
|
|
|
|
|
|
|
%install
|
2017-07-10 16:10:14 +02:00
|
|
|
%python_install
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/gunicorn
|
2018-10-18 12:07:32 +02:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2011-07-06 12:36:04 +02:00
|
|
|
|
2017-07-10 16:10:14 +02:00
|
|
|
%post
|
|
|
|
%python_install_alternative gunicorn
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative gunicorn
|
2011-07-06 12:36:04 +02:00
|
|
|
|
2017-07-10 16:10:14 +02:00
|
|
|
%files %{python_files}
|
2018-10-18 12:07:32 +02:00
|
|
|
%license LICENSE
|
2017-07-10 16:10:14 +02:00
|
|
|
%python_alternative %{_bindir}/gunicorn
|
2011-09-23 15:00:33 +02:00
|
|
|
%{python_sitelib}/*
|
2011-07-06 12:36:04 +02:00
|
|
|
|
2023-05-03 16:41:44 +02:00
|
|
|
%if 0%{?suse_version} > 1500
|
2017-07-10 16:10:14 +02:00
|
|
|
%files -n python-gunicorn-doc
|
2018-10-18 12:07:32 +02:00
|
|
|
%license LICENSE
|
2023-05-03 16:41:44 +02:00
|
|
|
%endif
|
2018-10-18 12:07:32 +02:00
|
|
|
%doc README.rst NOTICE THANKS docs/build/html
|
2021-07-07 10:43:45 +02:00
|
|
|
%endif
|
2011-07-06 12:36:04 +02:00
|
|
|
|
|
|
|
%changelog
|