diff options
author | Marius Bakke <marius@gnu.org> | 2021-05-06 01:01:58 +0200 |
---|---|---|
committer | Marius Bakke <marius@gnu.org> | 2021-05-06 19:10:04 +0200 |
commit | 0f056f2c3360fe43ed12a554cca34617435fe8ee (patch) | |
tree | 83d51e204444ec187fef70d413fc3bcbf9e6064b /gnu/packages/python-web.scm | |
parent | d51daf25c4210bdfe8e4d9db096bb8ccf088d3b4 (diff) | |
download | guix-0f056f2c3360fe43ed12a554cca34617435fe8ee.tar.gz |
gnu: gunicorn: Remove unneeded runtime dependencies.
* gnu/packages/python-web.scm (gunicorn)[arguments]: Override 'wrap' phase.
Diffstat (limited to 'gnu/packages/python-web.scm')
-rw-r--r-- | gnu/packages/python-web.scm | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 8b6b667c3f..4d6d4788a8 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -4730,8 +4730,22 @@ event loop. It is implemented in Cython and uses libuv under the hood.") (copy-recursively "examples" examples) (for-each (lambda (file) (copy-file file (string-append doc "/" file))) - '("README.rst" "NOTICE" "LICENSE" "THANKS"))) - #t))))) + '("README.rst" "NOTICE" "LICENSE" "THANKS"))))) + ;; XXX: The wrap phase includes native inputs on PYTHONPATH, (see + ;; <https://bugs.gnu.org/25235>), leading to an inflated closure + ;; size. Override it to only add the essential entries. + (replace 'wrap + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (python (assoc-ref (or native-inputs inputs) "python")) + (sitedir (string-append "/lib/python" + (python-version python) + "/site-packages"))) + (wrap-program (string-append out "/bin/gunicorn") + `("PYTHONPATH" ":" prefix + ,(map (lambda (output) + (string-append output sitedir)) + (list python out)))))))))) (native-inputs `(("binutils" ,binutils) ;; for ctypes.util.find_library() ("python-aiohttp" ,python-aiohttp) |