[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#41807] [PATCH 25/26] gnu: Add python-uvloop.
From: |
Giacomo Leidi |
Subject: |
[bug#41807] [PATCH 25/26] gnu: Add python-uvloop. |
Date: |
Thu, 11 Jun 2020 17:13:56 +0200 |
* gnu/packages/python-xyz.scm (python-uvloop): New variable.
---
gnu/packages/python-xyz.scm | 55 +++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index a8a32cb550..639e6a920f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -20479,3 +20479,58 @@ etc.). It's useful for building automated refactoring
applications and linters.
(description "@code{python-pywatchman} is a library to connect and
query Watchman to discover file changes.")
(license license:bsd-3)))
+
+(define-public python-uvloop
+ (package
+ (name "python-uvloop")
+ (version "0.14.0")
+ (source
+ (origin
+ (method git-fetch)
+ ;; git-reference because libuv is bundled in the PyPi package
+ (uri (git-reference
+ (url "https://github.com/MagicStack/uvloop.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0cvfaddk9195ai29y8nxf92fi71nypx3fhx219q3pammjnh9z861"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Unbundle libuv.
+ (substitute* "MANIFEST.in"
+ (("recursive-include vendor/libuv.*") "")
+ (("recursive-exclude vendor/libuv.*") ""))
+ (delete-file-recursively "vendor")
+ #t))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'build
+ (lambda _
+ (invoke "python" "setup.py"
+ "build_ext" "--inplace"
+ "--cython-always" "--use-system-libuv")))
+ (replace 'install
+ (lambda* (#:key outputs (configure-flags '()) #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (invoke "python" "setup.py" "install"
+ (string-append "--prefix=" out)
+ "--single-version-externally-managed"
+ "--root=/" "--skip-build"))))
+ ;; Tests depend on libuv being present in-tree.
+ (delete 'check))))
+ (inputs
+ `(("libuv" ,libuv)))
+ (native-inputs
+ `(("python-cython" ,python-cython)))
+ (home-page "https://github.com/MagicStack/uvloop")
+ (synopsis
+ "Fast implementation of asyncio event loop on top of libuv")
+ (description
+ "@code{python-uvloop} is a fast, drop-in replacement of the
+built-in @code{asyncio} event loop. @code{python-uvloop} is
+implemented in Cython and uses libuv under the hood.")
+ (license license:expat)))
--
2.26.2
- [bug#41807] [PATCH 05/26] gnu: Add python-sniffio., (continued)
- [bug#41807] [PATCH 05/26] gnu: Add python-sniffio., Giacomo Leidi, 2020/06/11
- [bug#41807] [PATCH 09/26] gnu: Add python-aiofiles., Giacomo Leidi, 2020/06/11
- [bug#41807] [PATCH 14/26] gnu: Add python-hstspreload., Giacomo Leidi, 2020/06/11
- [bug#41807] [PATCH 16/26] gnu: Add python-flake8-pyi., Giacomo Leidi, 2020/06/11
- [bug#41807] [PATCH 17/26] gnu: Add python-typing-inspect., Giacomo Leidi, 2020/06/11
- [bug#41807] [PATCH 19/26] gnu: Add python-pyre-extensions., Giacomo Leidi, 2020/06/11
- [bug#41807] [PATCH 02/26] gnu: Add python-immutables., Giacomo Leidi, 2020/06/11
- [bug#41807] [PATCH 11/26] gnu: Add python-hpack., Giacomo Leidi, 2020/06/11
- [bug#41807] [PATCH 22/26] gnu: Add python-libcst., Giacomo Leidi, 2020/06/11
- [bug#41807] [PATCH 23/26] gnu: Add python-pywatchman., Giacomo Leidi, 2020/06/11
- [bug#41807] [PATCH 25/26] gnu: Add python-uvloop.,
Giacomo Leidi <=
- [bug#41807] [PATCH 24/26] gnu: Add python-httpx., Giacomo Leidi, 2020/06/11
- [bug#41807] [PATCH 26/26] gnu: Add python-sanic., Giacomo Leidi, 2020/06/11
- [bug#41807] [PATCHES] Add python-sanic and dependencies., paul, 2020/06/11
- [bug#41807] [PATCHES] Add python-sanic and dependencies., Lars-Dominik Braun, 2020/06/17