From: guix-patches--- via <guix-patches@gnu.org>
To: 71914@debbugs.gnu.org
Cc: "Nguyễn Gia Phong" <mcsinyx@disroot.org>,
"Lars-Dominik Braun" <lars@6xq.net>,
"Marius Bakke" <marius@gnu.org>,
"Munyoki Kilyungi" <me@bonfacemunyoki.com>,
"Sharlatan Hellseher" <sharlatanus@gmail.com>,
"Tanguy Le Carrour" <tanguy@bioneland.org>,
jgart <jgart@dismail.de>
Subject: [bug#71914] [PATCH 10/10] gnu: Add python-nh3.
Date: Wed, 3 Jul 2024 16:58:01 +0900 [thread overview]
Message-ID: <856227e921e654836b68c7927ed0f9e4da5cb815.1719992277.git.mcsinyx@disroot.org> (raw)
In-Reply-To: <cover.1719992277.git.mcsinyx@disroot.org>
* gnu/packages/python-web.scm (python-nh3): New variable.
Change-Id: I21877b895467c290e07d11697a384c18a9c53113
---
gnu/packages/python-web.scm | 45 +++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 1363e6ccdf11..b8e74694011c 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -65,6 +65,7 @@
;;; Copyright © 2024 Sharlatan Hellseher <sharlatanus@gmail.com>
;;; Copyright © 2024 normally_js <normally_js@posteo.net>
;;; Copyright © 2024 Markku Korkeala <markku.korkeala@iki.fi>
+;;; Copyright © 2024 Nguyễn Gia Phong <mcsinyx@disroot.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -83,6 +84,7 @@
(define-module (gnu packages python-web)
#:use-module ((guix licenses) #:prefix license:)
+ #:use-module (guix build-system cargo)
#:use-module (guix build-system copy)
#:use-module (guix build-system pyproject)
#:use-module (guix build-system python)
@@ -96,6 +98,8 @@ (define-module (gnu packages python-web)
#:use-module (gnu packages bash)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages crates-io)
+ #:use-module (gnu packages crates-web)
#:use-module (gnu packages curl)
#:use-module (gnu packages databases)
#:use-module (gnu packages django)
@@ -122,6 +126,7 @@ (define-module (gnu packages python-web)
#:use-module (gnu packages qt)
#:use-module (gnu packages rdf)
#:use-module (gnu packages rpc)
+ #:use-module (gnu packages rust-apps)
#:use-module (gnu packages serialization)
#:use-module (gnu packages sphinx)
#:use-module (gnu packages texinfo)
@@ -3442,6 +3447,46 @@ (define-public python-ndg-httpsclient
(home-page "https://github.com/cedadev/ndg_httpsclient/")
(license license:bsd-3)))
+(define-public python-nh3
+ (package
+ (name "python-nh3")
+ (version "0.2.17")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "nh3" version))
+ (sha256
+ (base32 "0a7hrca5bbbrz20cbqy16n8vaxf4v2q1r9zv9vjlbmn334d79l20"))))
+ (build-system cargo-build-system)
+ (arguments
+ (list
+ #:imported-modules `(,@%cargo-build-system-modules
+ ,@%pyproject-build-system-modules)
+ #:modules '((guix build cargo-build-system)
+ ((guix build pyproject-build-system) #:prefix py:)
+ (guix build utils))
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'build (assoc-ref py:%standard-phases 'build))
+ (replace 'install (assoc-ref py:%standard-phases 'install))
+ ;; cargo-build-system's %standard-phases has 'check before 'install.
+ (delete 'check)
+ (add-after 'install 'check
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (when tests?
+ (py:add-installed-pythonpath inputs outputs)
+ (invoke "pytest" "-vv" "tests")))))
+ #:cargo-inputs
+ `(("rust-ammonia" ,rust-ammonia-4)
+ ("rust-pyo3" ,rust-pyo3-0.21))
+ #:install-source? #false))
+ (native-inputs (list maturin python-pytest python-wrapper))
+ (home-page "https://nh3.readthedocs.io")
+ (synopsis "Python bindings to Ammonia HTML sanitization library")
+ (description "This package provides Python bindings
+to Ammonia HTML sanitizer Rust crate.")
+ (license license:expat)))
+
(define-public python-noiseprotocol
(package
(name "python-noiseprotocol")
--
2.45.2
next prev parent reply other threads:[~2024-07-03 7:59 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-03 7:54 [bug#71914] [PATCH 00/10] gnu: Add python-nh3 guix-patches--- via
2024-07-03 7:57 ` [bug#71914] [PATCH 01/10] gnu: rust-typed-arena-2: Update to 2.0.2 guix-patches--- via
2024-07-03 7:57 ` [bug#71914] [PATCH 02/10] gnu: Add rust-markup5ever-0.12 guix-patches--- via
2024-07-03 7:57 ` [bug#71914] [PATCH 03/10] gnu: Add rust-html5ever-0.27 guix-patches--- via
2024-07-03 7:57 ` [bug#71914] [PATCH 04/10] gnu: Add rust-ammonia-4 guix-patches--- via
2024-07-03 7:57 ` [bug#71914] [PATCH 05/10] gnu: Add rust-pyo3-build-config-0.21 guix-patches--- via
2024-07-03 7:57 ` [bug#71914] [PATCH 06/10] gnu: Add rust-pyo3-ffi-0.21 guix-patches--- via
2024-07-03 7:57 ` [bug#71914] [PATCH 07/10] gnu: Add rust-pyo3-macros-backend-0.21 guix-patches--- via
2024-07-03 7:57 ` [bug#71914] [PATCH 08/10] gnu: Add rust-pyo3-macros-0.21 guix-patches--- via
2024-07-03 8:11 ` guix-patches--- via
2024-07-03 9:00 ` Efraim Flashner
2024-07-03 9:12 ` guix-patches--- via
2024-07-03 9:27 ` Efraim Flashner
2024-07-03 7:58 ` [bug#71914] [PATCH 09/10] gnu: Add rust-pyo3-0.21 guix-patches--- via
2024-07-03 7:58 ` guix-patches--- via [this message]
2024-07-03 9:07 ` bug#71914: [PATCH 00/10] gnu: Add python-nh3 Efraim Flashner
2024-07-03 9:20 ` [bug#71914] " guix-patches--- via
2024-07-03 9:24 ` Efraim Flashner
2024-07-03 9:44 ` guix-patches--- via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=856227e921e654836b68c7927ed0f9e4da5cb815.1719992277.git.mcsinyx@disroot.org \
--to=guix-patches@gnu.org \
--cc=71914@debbugs.gnu.org \
--cc=jgart@dismail.de \
--cc=lars@6xq.net \
--cc=marius@gnu.org \
--cc=mcsinyx@disroot.org \
--cc=me@bonfacemunyoki.com \
--cc=sharlatanus@gmail.com \
--cc=tanguy@bioneland.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).