unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#38251] [PATCH 1/1] gnu: Add gunicorn.
@ 2019-11-17 22:03 Hartmut Goebel
       [not found] ` <handler.38251.B.157402824119882.ack@debbugs.gnu.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Hartmut Goebel @ 2019-11-17 22:03 UTC (permalink / raw)
  To: 38251

* gnu/packages/python-web.scm (gunicorn): New variable
---
 gnu/packages/python-web.scm | 67 +++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index eb25bd0ade..1632d7ade5 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -54,6 +54,7 @@
   #:use-module (guix build-system python)
   #:use-module (guix utils)
   #:use-module (gnu packages)
+  #:use-module (gnu packages base)
   #:use-module (gnu packages check)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
@@ -67,6 +68,7 @@
   #:use-module (gnu packages python-crypto)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages sphinx)
+  #:use-module (gnu packages texinfo)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages time)
   #:use-module (gnu packages web)
@@ -3354,3 +3356,68 @@ Unlike the Python package @code{cssselect}, it does not translate selectors to
 XPath and therefore does not have all the correctness corner cases that are
 hard or impossible to fix in cssselect.")
     (license license:bsd-3)))
+
+(define-public gunicorn
+  (package
+    (name "gunicorn")
+    (version "20.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "gunicorn" version))
+       (sha256
+        (base32
+         "0l1zm8a0vz8ws3lkn8q9a0f93ipdzyvlf2zlwdj5xyadh6jdwsgg"))))
+    (outputs '("out" "doc"))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'build 'build-doc
+           (lambda _
+             (invoke "make" "-C" "docs" "PAPER=a4" "html" "info")
+             (delete-file "docs/build/texinfo/Makefile")
+             (delete-file "docs/build/texinfo/Gunicorn.texi")
+             #t))
+         (replace 'check
+           (lambda _
+             (setenv "PYTHONPATH"
+                     (string-append ".:" (getenv "PYTHONPATH")))
+             ;; Remove test modules failing due to libc not found due to
+             ;; section '.dynamic' not found in libc.so
+             (delete-file "tests/test_arbiter.py")
+             (delete-file "tests/test_config.py")
+             (delete-file "tests/test_sock.py")
+             (invoke "pytest")))
+         (add-after 'install 'install-doc
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((doc (string-append (assoc-ref outputs "doc")
+                                        "/share/doc/" ,name "-" ,version))
+                    (html (string-append doc "/html"))
+                    (info (string-append doc "/info"))
+                    (examples (string-append doc "/examples")))
+               (mkdir-p html)
+               (mkdir-p info)
+               (mkdir-p examples)
+               (copy-recursively "docs/build/html" html)
+               (copy-recursively "docs/build/texinfo" info)
+               (copy-recursively "examples" examples)
+               (for-each (lambda (file)
+                           (copy-file file (string-append doc "/" file)))
+                         '("README.rst" "NOTICE" "LICENSE" "THANKS")))
+             #t)))))
+    (native-inputs
+     `(("binutils" ,binutils)  ;; for ctypes.util.find_library()
+       ("python-aiohttp", python-aiohttp)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-cov" ,python-pytest-cov)
+       ("python-sphinx" ,python-sphinx)
+       ("texinfo" ,texinfo)))
+    (home-page "http://gunicorn.org/")
+    (synopsis "Python WSGI HTTP Server for UNIX")
+    (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, simply implemented, light on server resources,
+and fairly speedy.")
+  (license license:expat)))
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* bug#38251: Acknowledgement ([PATCH 1/1] gnu: Add gunicorn.)
       [not found] ` <handler.38251.B.157402824119882.ack@debbugs.gnu.org>
@ 2019-12-06 18:40   ` Hartmut Goebel
  0 siblings, 0 replies; 2+ messages in thread
From: Hartmut Goebel @ 2019-12-06 18:40 UTC (permalink / raw)
  To: 38251-close

Merged as a7469d1602a90298f66565bf22d43130955457b5

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-06 18:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-17 22:03 [bug#38251] [PATCH 1/1] gnu: Add gunicorn Hartmut Goebel
     [not found] ` <handler.38251.B.157402824119882.ack@debbugs.gnu.org>
2019-12-06 18:40   ` bug#38251: Acknowledgement ([PATCH 1/1] gnu: Add gunicorn.) Hartmut Goebel

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).