diff options
| author | Nicolas Graves <ngraves@ngraves.fr> | 2025-03-10 03:16:06 +0100 |
|---|---|---|
| committer | Andreas Enge <andreas@enge.fr> | 2025-04-16 11:46:34 +0200 |
| commit | 55d7b8f1f62ece942c42c7075e369049366d4cb7 (patch) | |
| tree | 4ccb338e54eda81ab246bf09a3583e3e8fdae485 /gnu/packages/python-web.scm | |
| parent | 2b8dd22bb947d171973c81a42eb9807cabef5ecc (diff) | |
gnu: gunicorn: Migrate 'check phase to pyproject-build-system.
* gnu/packages/python-web.scm (gunicorn)[arguments]
{phases}: Remove 'check phase and migrate its flags to...
{test-flags}: ...here.
Change-Id: I0635d386d91ef2476dd513787df166f1b181c03c
Signed-off-by: Steve George <steve@futurile.net>
Diffstat (limited to 'gnu/packages/python-web.scm')
| -rw-r--r-- | gnu/packages/python-web.scm | 119 |
1 files changed, 61 insertions, 58 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 7a091aa0448..a7d5faa14fd 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm | |||
| @@ -7486,72 +7486,75 @@ event loop. It is implemented in Cython and uses libuv under the hood.") | |||
| 7486 | (outputs '("out" "doc")) | 7486 | (outputs '("out" "doc")) |
| 7487 | (build-system pyproject-build-system) | 7487 | (build-system pyproject-build-system) |
| 7488 | (arguments | 7488 | (arguments |
| 7489 | `(#:phases | 7489 | `(#:test-flags |
| 7490 | (modify-phases %standard-phases | 7490 | ;; Disable the geventlet tests because eventlet uses dnspython, which |
| 7491 | (add-after 'build 'build-doc | 7491 | ;; does not work in the build container due to lack of /etc/resolv.conf |
| 7492 | (lambda _ | 7492 | '("--ignore=tests/workers/test_geventlet.py") |
| 7493 | (invoke "make" "-C" "docs" "PAPER=a4" "html" "info") | 7493 | #:phases (modify-phases %standard-phases |
| 7494 | (delete-file "docs/build/texinfo/Makefile") | 7494 | (add-after 'build 'build-doc |
| 7495 | (delete-file "docs/build/texinfo/Gunicorn.texi"))) | 7495 | (lambda _ |
| 7496 | (replace 'check | 7496 | (invoke "make" |
| 7497 | (lambda* (#:key tests? #:allow-other-keys) | 7497 | "-C" |
| 7498 | (if tests? | 7498 | "docs" |
| 7499 | (begin | 7499 | "PAPER=a4" |
| 7500 | (invoke "pytest" "-vv" | 7500 | "html" |
| 7501 | ;; Disable the geventlet tests because eventlet uses | 7501 | "info") |
| 7502 | ;; dnspython, which does not work in the build | 7502 | (delete-file "docs/build/texinfo/Makefile") |
| 7503 | ;; container due to lack of /etc/resolv.conf, etc. | 7503 | (delete-file "docs/build/texinfo/Gunicorn.texi"))) |
| 7504 | "--ignore=tests/workers/test_geventlet.py")) | 7504 | (add-after 'install 'install-doc |
| 7505 | (format #t "test suite not run~%")))) | 7505 | (lambda* (#:key outputs #:allow-other-keys) |
| 7506 | (add-after 'install 'install-doc | 7506 | (let* ((doc (string-append (assoc-ref outputs "doc") |
| 7507 | (lambda* (#:key outputs #:allow-other-keys) | 7507 | "/share/doc/" |
| 7508 | (let* ((doc (string-append (assoc-ref outputs "doc") | 7508 | ,name "-" |
| 7509 | "/share/doc/" ,name "-" ,version)) | 7509 | ,version)) |
| 7510 | (html (string-append doc "/html")) | 7510 | (html (string-append doc "/html")) |
| 7511 | (info (string-append doc "/info")) | 7511 | (info (string-append doc "/info")) |
| 7512 | (examples (string-append doc "/examples"))) | 7512 | (examples (string-append doc "/examples"))) |
| 7513 | (mkdir-p html) | 7513 | (mkdir-p html) |
| 7514 | (mkdir-p info) | 7514 | (mkdir-p info) |
| 7515 | (mkdir-p examples) | 7515 | (mkdir-p examples) |
| 7516 | (copy-recursively "docs/build/html" html) | 7516 | (copy-recursively "docs/build/html" html) |
| 7517 | (copy-recursively "docs/build/texinfo" info) | 7517 | (copy-recursively "docs/build/texinfo" info) |
| 7518 | (copy-recursively "examples" examples) | 7518 | (copy-recursively "examples" examples) |
| 7519 | (for-each (lambda (file) | 7519 | (for-each (lambda (file) |
| 7520 | (copy-file file (string-append doc "/" file))) | 7520 | (copy-file file |
| 7521 | '("README.rst" "NOTICE" "LICENSE" "THANKS"))))) | 7521 | (string-append doc "/" file))) |
| 7522 | ;; XXX: The wrap phase includes native inputs on PYTHONPATH, (see | 7522 | '("README.rst" "NOTICE" "LICENSE" "THANKS"))))) |
| 7523 | ;; <https://bugs.gnu.org/25235>), leading to an inflated closure | 7523 | ;; XXX: The wrap phase includes native inputs on PYTHONPATH, (see |
| 7524 | ;; size. Override it to only add the essential entries. | 7524 | ;; <https://bugs.gnu.org/25235>), leading to an inflated closure |
| 7525 | (replace 'wrap | 7525 | ;; size. Override it to only add the essential entries. |
| 7526 | (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) | 7526 | (replace 'wrap |
| 7527 | (let* ((out (assoc-ref outputs "out")) | 7527 | (lambda* (#:key native-inputs inputs outputs |
| 7528 | (python (assoc-ref (or native-inputs inputs) "python")) | 7528 | #:allow-other-keys) |
| 7529 | (sitedir (string-append "/lib/python" | 7529 | (let* ((out (assoc-ref outputs "out")) |
| 7530 | (python-version python) | 7530 | (python (assoc-ref (or native-inputs inputs) |
| 7531 | "/site-packages"))) | 7531 | "python")) |
| 7532 | (wrap-program (string-append out "/bin/gunicorn") | 7532 | (sitedir (string-append "/lib/python" |
| 7533 | `("PYTHONPATH" ":" prefix | 7533 | (python-version python) |
| 7534 | ,(map (lambda (output) | 7534 | "/site-packages"))) |
| 7535 | (string-append output sitedir)) | 7535 | (wrap-program (string-append out "/bin/gunicorn") |
| 7536 | (list python out)))))))))) | 7536 | `("PYTHONPATH" ":" prefix |
| 7537 | ,(map (lambda (output) | ||
| 7538 | (string-append output sitedir)) | ||
| 7539 | (list python out)))))))))) | ||
| 7537 | (inputs (list bash-minimal)) | 7540 | (inputs (list bash-minimal)) |
| 7538 | (native-inputs | 7541 | (native-inputs (list binutils ;for ctypes.util.find_library() |
| 7539 | (list binutils ;; for ctypes.util.find_library() | 7542 | python-aiohttp |
| 7540 | python-aiohttp | 7543 | python-gevent |
| 7541 | python-gevent | 7544 | python-pytest |
| 7542 | python-pytest | 7545 | python-pytest-cov |
| 7543 | python-pytest-cov | 7546 | python-sphinx |
| 7544 | python-sphinx | 7547 | texinfo)) |
| 7545 | texinfo)) | ||
| 7546 | (propagated-inputs (list python-packaging python-setuptools python-wheel)) | 7548 | (propagated-inputs (list python-packaging python-setuptools python-wheel)) |
| 7547 | (home-page "https://gunicorn.org/") | 7549 | (home-page "https://gunicorn.org/") |
| 7548 | (synopsis "Python WSGI HTTP Server for UNIX") | 7550 | (synopsis "Python WSGI HTTP Server for UNIX") |
| 7549 | (description "Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP | 7551 | (description |
| 7552 | "Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP | ||
| 7550 | Server for UNIX. It’s a pre-fork worker model ported from Ruby’s | 7553 | Server for UNIX. It’s a pre-fork worker model ported from Ruby’s |
| 7551 | Unicorn project. The Gunicorn server is broadly compatible with | 7554 | Unicorn project. The Gunicorn server is broadly compatible with |
| 7552 | various web frameworks, simply implemented, light on server resources, | 7555 | various web frameworks, simply implemented, light on server resources, |
| 7553 | and fairly speedy.") | 7556 | and fairly speedy.") |
| 7554 | (license license:expat))) | 7557 | (license license:expat))) |
| 7555 | 7558 | ||
| 7556 | (define-public gunicorn-next | 7559 | (define-public gunicorn-next |
| 7557 | (package | 7560 | (package |
