mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
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>
This commit is contained in:
parent
2b8dd22bb9
commit
55d7b8f1f6
1 changed files with 61 additions and 58 deletions
|
@ -7486,72 +7486,75 @@ event loop. It is implemented in Cython and uses libuv under the hood.")
|
||||||
(outputs '("out" "doc"))
|
(outputs '("out" "doc"))
|
||||||
(build-system pyproject-build-system)
|
(build-system pyproject-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
`(#:test-flags
|
||||||
(modify-phases %standard-phases
|
;; Disable the geventlet tests because eventlet uses dnspython, which
|
||||||
(add-after 'build 'build-doc
|
;; does not work in the build container due to lack of /etc/resolv.conf
|
||||||
(lambda _
|
'("--ignore=tests/workers/test_geventlet.py")
|
||||||
(invoke "make" "-C" "docs" "PAPER=a4" "html" "info")
|
#:phases (modify-phases %standard-phases
|
||||||
(delete-file "docs/build/texinfo/Makefile")
|
(add-after 'build 'build-doc
|
||||||
(delete-file "docs/build/texinfo/Gunicorn.texi")))
|
(lambda _
|
||||||
(replace 'check
|
(invoke "make"
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
"-C"
|
||||||
(if tests?
|
"docs"
|
||||||
(begin
|
"PAPER=a4"
|
||||||
(invoke "pytest" "-vv"
|
"html"
|
||||||
;; Disable the geventlet tests because eventlet uses
|
"info")
|
||||||
;; dnspython, which does not work in the build
|
(delete-file "docs/build/texinfo/Makefile")
|
||||||
;; container due to lack of /etc/resolv.conf, etc.
|
(delete-file "docs/build/texinfo/Gunicorn.texi")))
|
||||||
"--ignore=tests/workers/test_geventlet.py"))
|
(add-after 'install 'install-doc
|
||||||
(format #t "test suite not run~%"))))
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(add-after 'install 'install-doc
|
(let* ((doc (string-append (assoc-ref outputs "doc")
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
"/share/doc/"
|
||||||
(let* ((doc (string-append (assoc-ref outputs "doc")
|
,name "-"
|
||||||
"/share/doc/" ,name "-" ,version))
|
,version))
|
||||||
(html (string-append doc "/html"))
|
(html (string-append doc "/html"))
|
||||||
(info (string-append doc "/info"))
|
(info (string-append doc "/info"))
|
||||||
(examples (string-append doc "/examples")))
|
(examples (string-append doc "/examples")))
|
||||||
(mkdir-p html)
|
(mkdir-p html)
|
||||||
(mkdir-p info)
|
(mkdir-p info)
|
||||||
(mkdir-p examples)
|
(mkdir-p examples)
|
||||||
(copy-recursively "docs/build/html" html)
|
(copy-recursively "docs/build/html" html)
|
||||||
(copy-recursively "docs/build/texinfo" info)
|
(copy-recursively "docs/build/texinfo" info)
|
||||||
(copy-recursively "examples" examples)
|
(copy-recursively "examples" examples)
|
||||||
(for-each (lambda (file)
|
(for-each (lambda (file)
|
||||||
(copy-file file (string-append doc "/" file)))
|
(copy-file file
|
||||||
'("README.rst" "NOTICE" "LICENSE" "THANKS")))))
|
(string-append doc "/" file)))
|
||||||
;; XXX: The wrap phase includes native inputs on PYTHONPATH, (see
|
'("README.rst" "NOTICE" "LICENSE" "THANKS")))))
|
||||||
;; <https://bugs.gnu.org/25235>), leading to an inflated closure
|
;; XXX: The wrap phase includes native inputs on PYTHONPATH, (see
|
||||||
;; size. Override it to only add the essential entries.
|
;; <https://bugs.gnu.org/25235>), leading to an inflated closure
|
||||||
(replace 'wrap
|
;; size. Override it to only add the essential entries.
|
||||||
(lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
|
(replace 'wrap
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(lambda* (#:key native-inputs inputs outputs
|
||||||
(python (assoc-ref (or native-inputs inputs) "python"))
|
#:allow-other-keys)
|
||||||
(sitedir (string-append "/lib/python"
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
(python-version python)
|
(python (assoc-ref (or native-inputs inputs)
|
||||||
"/site-packages")))
|
"python"))
|
||||||
(wrap-program (string-append out "/bin/gunicorn")
|
(sitedir (string-append "/lib/python"
|
||||||
`("PYTHONPATH" ":" prefix
|
(python-version python)
|
||||||
,(map (lambda (output)
|
"/site-packages")))
|
||||||
(string-append output sitedir))
|
(wrap-program (string-append out "/bin/gunicorn")
|
||||||
(list python out))))))))))
|
`("PYTHONPATH" ":" prefix
|
||||||
|
,(map (lambda (output)
|
||||||
|
(string-append output sitedir))
|
||||||
|
(list python out))))))))))
|
||||||
(inputs (list bash-minimal))
|
(inputs (list bash-minimal))
|
||||||
(native-inputs
|
(native-inputs (list binutils ;for ctypes.util.find_library()
|
||||||
(list binutils ;; for ctypes.util.find_library()
|
python-aiohttp
|
||||||
python-aiohttp
|
python-gevent
|
||||||
python-gevent
|
python-pytest
|
||||||
python-pytest
|
python-pytest-cov
|
||||||
python-pytest-cov
|
python-sphinx
|
||||||
python-sphinx
|
texinfo))
|
||||||
texinfo))
|
|
||||||
(propagated-inputs (list python-packaging python-setuptools python-wheel))
|
(propagated-inputs (list python-packaging python-setuptools python-wheel))
|
||||||
(home-page "https://gunicorn.org/")
|
(home-page "https://gunicorn.org/")
|
||||||
(synopsis "Python WSGI HTTP Server for UNIX")
|
(synopsis "Python WSGI HTTP Server for UNIX")
|
||||||
(description "Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP
|
(description
|
||||||
|
"Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP
|
||||||
Server for UNIX. It’s a pre-fork worker model ported from Ruby’s
|
Server for UNIX. It’s a pre-fork worker model ported from Ruby’s
|
||||||
Unicorn project. The Gunicorn server is broadly compatible with
|
Unicorn project. The Gunicorn server is broadly compatible with
|
||||||
various web frameworks, simply implemented, light on server resources,
|
various web frameworks, simply implemented, light on server resources,
|
||||||
and fairly speedy.")
|
and fairly speedy.")
|
||||||
(license license:expat)))
|
(license license:expat)))
|
||||||
|
|
||||||
(define-public gunicorn-next
|
(define-public gunicorn-next
|
||||||
(package
|
(package
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue