unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#43233] [PATCH 01/10] gnu: Add python-httptools.
@ 2020-09-06  5:45 Vinicius Monego
  2020-09-06  5:46 ` [bug#43233] [PATCH 02/10] gnu: Add python-uvloop Vinicius Monego
  0 siblings, 1 reply; 11+ messages in thread
From: Vinicius Monego @ 2020-09-06  5:45 UTC (permalink / raw)
  To: 43233; +Cc: Vinicius Monego

* gnu/packages/python-web.scm (python-httptools): New variable.
---
 gnu/packages/python-web.scm | 49 +++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 42b2bbc1a1..5dc7430bde 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -3957,6 +3957,55 @@ and fairly speedy.")
     (properties '((hidden? . #t)))
     (native-inputs `())))
 
+(define-public python-httptools
+  (package
+    (name "python-httptools")
+    (version "0.1.1")
+    (source
+     (origin
+       ;; PyPI tarball comes with a vendored http-parser and no tests.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/MagicStack/httptools")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0g08128x2ixsiwrzskxc6c8ymgzs39wbzr5mhy0mjk30q9pqqv77"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'preparations
+           (lambda _
+             ;; Skip a failing test (AssertionError).  Bug report:
+             ;; https://github.com/MagicStack/httptools/issues/10.
+             (substitute* "tests/test_parser.py"
+               (("    def test_parser_response_1")
+                (string-append
+                 "    @unittest.skip(\"Disabled.\")\n"
+                 "    def test_parser_response_1")))
+             ;; Use packaged http-parser.
+             (substitute* "setup.py" (("self.use_system_http_parser = False")
+                                      "self.use_system_http_parser = True"))
+             ;; This path is hardcoded.  Hardcode our own.
+             (substitute* "httptools/parser/cparser.pxd"
+               (("../../vendor/http-parser")
+                (string-append (assoc-ref %build-inputs "http-parser")
+                               "/include")))
+             ;; Don't force Cython version.
+             (substitute* "setup.py" (("Cython==") "Cython>="))
+             #t)))))
+    (native-inputs
+     `(("python-cython" ,python-cython)
+       ("python-pytest" ,python-pytest)))
+    (inputs
+     `(("http-parser" ,http-parser)))
+    (home-page "https://github.com/MagicStack/httptools")
+    (synopsis "Collection of framework independent HTTP protocol utils")
+    (description
+     "@code{httptools} is a Python binding for the nodejs HTTP parser.")
+    (license license:expat)))
+
 (define-public python-translation-finder
   (package
     (name "python-translation-finder")
-- 
2.20.1





^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-09-07  7:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-06  5:45 [bug#43233] [PATCH 01/10] gnu: Add python-httptools Vinicius Monego
2020-09-06  5:46 ` [bug#43233] [PATCH 02/10] gnu: Add python-uvloop Vinicius Monego
2020-09-06  5:46   ` [bug#43233] [PATCH 03/10] gnu: Add python-pytest-toolbox Vinicius Monego
2020-09-06  5:46   ` [bug#43233] [PATCH 04/10] gnu: Add python-watchgod Vinicius Monego
2020-09-06  5:46   ` [bug#43233] [PATCH 05/10] gnu: Add python-uvicorn Vinicius Monego
2020-09-06  5:46   ` [bug#43233] [PATCH 06/10] gnu: Add python-flake8-pie Vinicius Monego
2020-09-06  5:46   ` [bug#43233] [PATCH 07/10] gnu: Add python-autoflake Vinicius Monego
2020-09-06  5:46   ` [bug#43233] [PATCH 08/10] gnu: Add python-trio-typing Vinicius Monego
2020-09-06  5:46   ` [bug#43233] [PATCH 09/10] gnu: Add python-httpcore Vinicius Monego
2020-09-06  5:46   ` [bug#43233] [PATCH 10/10] gnu: Add python-httpx Vinicius Monego
2020-09-07  7:12     ` bug#43233: " Mathieu Othacehe

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).