Ondřej Súkup
d6f8ce83f4
- gevent and evenlet are BuildRequires for check - add suggests * document WEB_CONCURRENCY is set by, at least, Heroku * capture peername from accept: Avoid calls to getpeername by capturing the peer name returned by accept * log a warning when a worker was terminated due to a signal * fix tornado usage with latest versions of Django * add support for python -m gunicorn * fix systemd socket activation example * allows to set wsgi application in configg file using wsgi_app * document --timeout = 0 * always close a connection when the number of requests exceeds the max requests * Disable keepalive during graceful shutdown * kill tasks in the gthread workers during upgrade * fix latency in gevent worker when accepting new requests * fix file watcher: handle errors when new worker reboot and ensure the list of files is kept * document the default name and path of the configuration file * document how variable impact configuration * document the $PORT environment variable * added milliseconds option to request_time in access_log * added PIP requirements to be used for example * remove version from the Server header * fix sendfile: use socket.sendfile instead of os.sendfile * reloader: use absolute path to prevent empty to prevent0 InotifyError when a file is added to the working directory * Add --print-config option to print the resolved settings at startup. * remove the --log-dict-config CLI flag because it never had a working format OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-gunicorn?expand=0&rev=48
100 lines
3.1 KiB
RPMSpec
100 lines
3.1 KiB
RPMSpec
#
|
|
# spec file for package python-gunicorn
|
|
#
|
|
# Copyright (c) 2021 SUSE LLC
|
|
#
|
|
# 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.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define skip_python2 1
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
Name: python-gunicorn
|
|
Version: 20.1.0
|
|
Release: 0
|
|
Summary: WSGI HTTP Server for UNIX
|
|
License: MIT
|
|
Group: Development/Languages/Python
|
|
URL: https://gunicorn.org
|
|
Source: https://files.pythonhosted.org/packages/source/g/gunicorn/gunicorn-%{version}.tar.gz
|
|
BuildRequires: %{python_module eventlet}
|
|
BuildRequires: %{python_module gevent}
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module setuptools >= 3.0}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
BuildRequires: python3-Sphinx
|
|
Requires: python-setuptools >= 3.0
|
|
Requires(post): update-alternatives
|
|
Requires(postun): update-alternatives
|
|
Suggests: %{python_module evenlet}
|
|
Suggests: %{python_module gevent}
|
|
Suggests: %{python_module gthread}
|
|
Suggests: %{python_module setproctitle}
|
|
Suggests: %{python_module tornado}
|
|
BuildArch: noarch
|
|
%python_subpackages
|
|
|
|
%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
|
|
compatible with various web frameworks.
|
|
|
|
%package -n python-gunicorn-doc
|
|
Summary: Documentation for %{name}
|
|
Group: Documentation/Other
|
|
Provides: %{python_module gunicorn-doc = %{version}}
|
|
|
|
%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
|
|
compatible with various web frameworks.
|
|
|
|
This package contains the documentation.
|
|
|
|
%prep
|
|
%setup -q -n gunicorn-%{version}
|
|
# remove version pinning for test requirements
|
|
sed -i 's/==.*//' requirements_test.txt
|
|
sed -i -e '/cover/d' requirements_test.txt
|
|
# do not check coverage
|
|
sed -i -e 's/--cov[^ ]*//' -e 's/--cov-report[^ ]*//' setup.cfg
|
|
|
|
%build
|
|
%python_build
|
|
sphinx-build -b html -d docs/build/doctrees docs/source docs/build/html
|
|
|
|
%install
|
|
%python_install
|
|
%python_clone -a %{buildroot}%{_bindir}/gunicorn
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
%pytest
|
|
|
|
%post
|
|
%python_install_alternative gunicorn
|
|
|
|
%postun
|
|
%python_uninstall_alternative gunicorn
|
|
|
|
%files %{python_files}
|
|
%license LICENSE
|
|
%python_alternative %{_bindir}/gunicorn
|
|
%{python_sitelib}/*
|
|
|
|
%files -n python-gunicorn-doc
|
|
%license LICENSE
|
|
%doc README.rst NOTICE THANKS docs/build/html
|
|
|
|
%changelog
|