[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch core-updates-frozen updated: gnu: python-aiohttp: Remove cythoniz
From: |
guix-commits |
Subject: |
branch core-updates-frozen updated: gnu: python-aiohttp: Remove cythonized files. |
Date: |
Wed, 27 Oct 2021 16:03:21 -0400 |
This is an automated email from the git hooks/post-receive script.
efraim pushed a commit to branch core-updates-frozen
in repository guix.
The following commit(s) were added to refs/heads/core-updates-frozen by this
push:
new dac8d01 gnu: python-aiohttp: Remove cythonized files.
dac8d01 is described below
commit dac8d013bd1fc7f57b8ba3582eef6e0e01b23dfd
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Tue Oct 26 11:06:23 2021 +0300
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.
---
gnu/packages/python-web.scm | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 05b1c99..8783c75 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -172,7 +172,16 @@ API rules.")
(method url-fetch)
(uri (pypi-uri "aiohttp" version))
(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)
(arguments
'(#:phases
@@ -195,6 +204,15 @@ API rules.")
;; Don't test the aiohttp pytest plugin to avoid a dependency
loop.
(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
(lambda* (#:key tests? #:allow-other-keys)
(if tests?
@@ -216,6 +234,7 @@ API rules.")
(native-inputs
`(("gunicorn" ,gunicorn-bootstrap)
("python-async-generator" ,python-async-generator)
+ ("python-cython" ,python-cython)
("python-freezegun" ,python-freezegun)
("python-pytest" ,python-pytest-6.1)
("python-pytest-mock" ,python-pytest-mock)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch core-updates-frozen updated: gnu: python-aiohttp: Remove cythonized files.,
guix-commits <=