From b7a36599b4533db35e27e0fc5506589fb7c8221f Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 26 Oct 2021 11:06:23 +0300 Subject: 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 | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index 2b5379950d..a38ed5c268 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -171,7 +171,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") #t)) + (add-before 'build 'cythonize + (lambda _ + ;; Adapted from the Makefile. + (with-directory-excursion "aiohttp" + (for-each + (lambda (file) + (invoke "cython" "-3" + file "-I" "aiohttp")) + (find-files "." "_.*\\.pyx$"))))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (setenv "PYTHONPATH" @@ -216,7 +234,8 @@ API rules.") ("python-typing-extensions" ,python-typing-extensions) ("python-yarl" ,python-yarl))) (native-inputs - `(("python-pytest" ,python-pytest) + `(("python-cython" ,python-cython) + ("python-pytest" ,python-pytest) ("python-pytest-mock" ,python-pytest-mock) ("python-re-assert" ,python-re-assert) ("gunicorn" ,gunicorn-bootstrap) -- cgit 1.4.1 From cb11325a1870c61143929acb9d32953bacd2b265 Mon Sep 17 00:00:00 2001 From: jgart Date: Fri, 22 Oct 2021 04:06:17 -0400 Subject: gnu: python-slugify: Update to 5.0.2. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/python-web.scm (python-slugify): Update to 5.0.2. Signed-off-by: Ludovic Courtès --- gnu/packages/python-web.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index a38ed5c268..fcca8697a8 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -4581,13 +4581,13 @@ Python.") (define-public python-slugify (package (name "python-slugify") - (version "4.0.1") + (version "5.0.2") (source (origin (method url-fetch) (uri (pypi-uri "python-slugify" version)) (sha256 - (base32 "0w22fapghmzk3xdasc4dn7h8sl58l08d1h5zbf72dh80drv1g9b9")))) + (base32 "1aww2ncglyii4jkbfjxqhinivawf9zmwifcj32d69gpwp6h86czi")))) (propagated-inputs `(("python-unidecode" ,python-unidecode))) (arguments -- cgit 1.4.1 From 7dbd5339d7e9c572afa0aa051dd304abe702cb7d Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 28 Oct 2021 21:02:57 +0200 Subject: gnu: python-slugify: Honor #:tests?. * gnu/packages/python-web.scm (python-slugify)[arguments]: Honor #:tests? --- gnu/packages/python-web.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python-web.scm') diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm index fcca8697a8..62de043e70 100644 --- a/gnu/packages/python-web.scm +++ b/gnu/packages/python-web.scm @@ -4594,8 +4594,9 @@ Python.") `(#:phases (modify-phases %standard-phases (replace 'check - (lambda _ - (invoke "python" "test.py")))))) + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "python" "test.py"))))))) (build-system python-build-system) (home-page "https://github.com/un33k/python-slugify") (synopsis "Python Slugify application that handles Unicode") -- cgit 1.4.1