[packages/python-gunicorn] new, version 18.0
glen
glen at pld-linux.org
Tue Sep 17 23:26:48 CEST 2013
commit d556a27f7a4f3f802cf815f6ee569b5c27b47fe6
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Wed Sep 18 00:26:04 2013 +0300
new, version 18.0
created from fedora package
1ee4e9929372fb3ef3601737ca03d953ebba5e55
python-gunicorn-dev-log.patch | 25 +++++++++
python-gunicorn.spec | 125 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 150 insertions(+)
---
diff --git a/python-gunicorn.spec b/python-gunicorn.spec
new file mode 100644
index 0000000..87376a8
--- /dev/null
+++ b/python-gunicorn.spec
@@ -0,0 +1,125 @@
+#
+# Conditional build:
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
+%define module gunicorn
+Summary: Python WSGI application server
+Name: python-%{module}
+Version: 18.0
+Release: 1
+License: MIT
+Group: Daemons
+URL: http://gunicorn.org/
+Source0: http://pypi.python.org/packages/source/g/%{module}/%{module}-%{version}.tar.gz
+# distro-specific, not upstreamable
+Patch100: %{name}-dev-log.patch
+Requires: python-setuptools
+%if %{with python2}
+BuildRequires: python-devel
+BuildRequires: python-setuptools
+%endif
+%if %{with python3}
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+%endif
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Gunicorn ("Green Unicorn") is a Python WSGI HTTP server for UNIX. It
+uses the pre-fork worker model, ported from Ruby's Unicorn project. It
+supports WSGI, Django, and Paster applications.
+
+%package -n python3-%{module}
+Summary: Python WSGI application server
+Group: Libraries/Python
+Requires: python3-setuptools
+
+%description -n python3-%{module}
+Gunicorn ("Green Unicorn") is a Python WSGI HTTP server for UNIX. It
+uses the pre-fork worker model, ported from Ruby's Unicorn project. It
+supports WSGI, Django, and Paster applications.
+
+%prep
+%setup -qc
+mv %{module}-%{version} py2
+cd py2
+%patch100 -p1
+cd -
+
+%if %{with python3}
+cp -a py2 py3
+%endif
+
+%build
+%if %{with python2}
+cd py2
+%{__python} setup.py build
+cd -
+%endif
+
+%if %{with python3}
+cd py3
+%{__python3} setup.py build
+%endif
+
+%if %{with tests}
+cd py2
+%{__python} setup.py test
+cd -
+
+%if %{with python3}
+cd py3
+%{__python3} setup.py test
+%endif
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%if %{with python3}
+cd py3
+%{__python3} setup.py install \
+ --skip-build \
+ --optimize=2 \
+ --root=$RPM_BUILD_ROOT
+
+# rename executables in %{_bindir} so they don't collide
+for executable in %{module} %{module}_django %{module}_paster; do
+ mv $RPM_BUILD_ROOT%{_bindir}/{,python3-}$executable
+done
+cd -
+%endif
+
+%if %{with python2}
+cd py2
+%{__python} setup.py install \
+ --skip-build \
+ --optimize=2 \
+ --root=$RPM_BUILD_ROOT
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc py2/{LICENSE,NOTICE,README.rst,THANKS}
+%attr(755,root,root) %{_bindir}/%{module}
+%attr(755,root,root) %{_bindir}/%{module}_django
+%attr(755,root,root) %{_bindir}/%{module}_paster
+%{py_sitescriptdir}/gunicorn
+%{py_sitescriptdir}/gunicorn-%{version}0-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%doc py3/{LICENSE,NOTICE,README.rst,THANKS}
+%attr(755,root,root) %{_bindir}/python3-%{module}
+%attr(755,root,root) %{_bindir}/python3-%{module}_django
+%attr(755,root,root) %{_bindir}/python3-%{module}_paster
+%{py3_sitescriptdir}/gunicorn
+%{py3_sitescriptdir}/gunicorn-%{version}-py*.egg-info
+%endif
diff --git a/python-gunicorn-dev-log.patch b/python-gunicorn-dev-log.patch
new file mode 100644
index 0000000..10943c0
--- /dev/null
+++ b/python-gunicorn-dev-log.patch
@@ -0,0 +1,25 @@
+From 11d0de1ac9da393ed1188f99c1bbcff6eac25d21 Mon Sep 17 00:00:00 2001
+From: Dan Callaghan <dcallagh at redhat.com>
+Date: Wed, 2 Jan 2013 11:48:54 +1000
+Subject: [PATCH] use /dev/log for syslog
+
+---
+ gunicorn/config.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gunicorn/config.py b/gunicorn/config.py
+index f1a0870..d58fbf7 100644
+--- a/gunicorn/config.py
++++ b/gunicorn/config.py
+@@ -1245,7 +1245,7 @@ class SyslogTo(Setting):
+ default = "unix:///var/run/syslog"
+ elif PLATFORM in ('freebsd', 'dragonfly', ):
+ default = "unix:///var/run/log"
+- elif PLATFORM == "openbsd":
++ elif PLATFORM in ("openbsd", "linux"):
+ default = "unix:///dev/log"
+ else:
+ default = "udp://localhost:514"
+--
+1.7.11.7
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-gunicorn.git/commitdiff/d556a27f7a4f3f802cf815f6ee569b5c27b47fe6
More information about the pld-cvs-commit
mailing list