mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: python-aiohttp: Remove cythonized files.
* gnu/packages/python-web.scm (python-aiohttp)[source]: Add snippet to remove generated cythonized files. [arguments]: Add phase to generate cythonized files. [native-inputs]: Add python-cython.
This commit is contained in:
parent
fb995ff510
commit
dac8d013bd
1 changed files with 20 additions and 1 deletions
|
@ -172,7 +172,16 @@ API rules.")
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (pypi-uri "aiohttp" version))
|
(uri (pypi-uri "aiohttp" version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "1pn79h8fng4xi5gl1f6saw31nxgmgyxl41yf3vba1l21673yr12x"))))
|
(base32 "1pn79h8fng4xi5gl1f6saw31nxgmgyxl41yf3vba1l21673yr12x"))
|
||||||
|
(modules '((guix build utils)))
|
||||||
|
(snippet
|
||||||
|
'(begin
|
||||||
|
(for-each delete-file
|
||||||
|
'("aiohttp/_frozenlist.c"
|
||||||
|
"aiohttp/_helpers.c"
|
||||||
|
"aiohttp/_http_parser.c"
|
||||||
|
"aiohttp/_http_writer.c"
|
||||||
|
"aiohttp/_websocket.c"))))))
|
||||||
(build-system python-build-system)
|
(build-system python-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
'(#:phases
|
'(#:phases
|
||||||
|
@ -195,6 +204,15 @@ API rules.")
|
||||||
|
|
||||||
;; Don't test the aiohttp pytest plugin to avoid a dependency loop.
|
;; Don't test the aiohttp pytest plugin to avoid a dependency loop.
|
||||||
(delete-file "tests/test_pytest_plugin.py")))
|
(delete-file "tests/test_pytest_plugin.py")))
|
||||||
|
(add-before 'build 'cythonize
|
||||||
|
(lambda _
|
||||||
|
;; Adapted from the Makefile.
|
||||||
|
(with-directory-excursion "aiohttp"
|
||||||
|
(for-each
|
||||||
|
(lambda (file)
|
||||||
|
(invoke "cython" "-3"
|
||||||
|
file "-I" "."))
|
||||||
|
(find-files "." "_.*\\.pyx$")))))
|
||||||
(replace 'check
|
(replace 'check
|
||||||
(lambda* (#:key tests? #:allow-other-keys)
|
(lambda* (#:key tests? #:allow-other-keys)
|
||||||
(if tests?
|
(if tests?
|
||||||
|
@ -216,6 +234,7 @@ API rules.")
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("gunicorn" ,gunicorn-bootstrap)
|
`(("gunicorn" ,gunicorn-bootstrap)
|
||||||
("python-async-generator" ,python-async-generator)
|
("python-async-generator" ,python-async-generator)
|
||||||
|
("python-cython" ,python-cython)
|
||||||
("python-freezegun" ,python-freezegun)
|
("python-freezegun" ,python-freezegun)
|
||||||
("python-pytest" ,python-pytest-6.1)
|
("python-pytest" ,python-pytest-6.1)
|
||||||
("python-pytest-mock" ,python-pytest-mock)
|
("python-pytest-mock" ,python-pytest-mock)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue