From patchwork Wed Jul 3 07:58:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "ashish.is--- via Guix-patches\" via" X-Patchwork-Id: 65867 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 83A0027BBE2; Wed, 3 Jul 2024 08:59:32 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B602627BBE9 for ; Wed, 3 Jul 2024 08:59:30 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sOutO-0001M8-Vi; Wed, 03 Jul 2024 03:59:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sOutN-0001HE-QP for guix-patches@gnu.org; Wed, 03 Jul 2024 03:59:05 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sOutN-0007VZ-Gk; Wed, 03 Jul 2024 03:59:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sOutN-0002yQ-Px; Wed, 03 Jul 2024 03:59:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71914] [PATCH 10/10] gnu: Add python-nh3. Resent-From: =?utf-8?b?Tmd1eeG7hW4=?= Gia Phong Original-Sender: "Debbugs-submit" Resent-CC: lars@6xq.net, marius@gnu.org, me@bonfacemunyoki.com, sharlatanus@gmail.com, tanguy@bioneland.org, jgart@dismail.de, guix-patches@gnu.org Resent-Date: Wed, 03 Jul 2024 07:59:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71914 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 71914@debbugs.gnu.org Cc: =?utf-8?b?Tmd1eeG7hW4=?= Gia Phong , Lars-Dominik Braun , Marius Bakke , Munyoki Kilyungi , Sharlatan Hellseher , Tanguy Le Carrour , jgart X-Debbugs-Original-Xcc: Lars-Dominik Braun , Marius Bakke , Munyoki Kilyungi , Sharlatan Hellseher , Tanguy Le Carrour , jgart Received: via spool by 71914-submit@debbugs.gnu.org id=B71914.171999352811321 (code B ref 71914); Wed, 03 Jul 2024 07:59:05 +0000 Received: (at 71914) by debbugs.gnu.org; 3 Jul 2024 07:58:48 +0000 Received: from localhost ([127.0.0.1]:38597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sOut5-0002wX-MY for submit@debbugs.gnu.org; Wed, 03 Jul 2024 03:58:48 -0400 Received: from layka.disroot.org ([178.21.23.139]:49464) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sOut3-0002wI-Ub for 71914@debbugs.gnu.org; Wed, 03 Jul 2024 03:58:46 -0400 X-Virus-Scanned: SPAM Filter at disroot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1719993522; bh=8MBj32z7FXc6BmnjoEJooGHGrbW6GNwnTTT2TeELb8E=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=P6EYQu0pMyGNXhfQtRzNpPoCEQU5ZUkXL9VYIj5uvt4E7Iua4EOWkXeP92sp1iVMc 3cXXaHBA0qsUJ/Grco1PDwbaTxpuo060RHGh4vAdiJX3TpsEvcRY8WCDtOg146WW6F ATuRuKG77MXLRBNF5MIZGW17Db7oej+bJXN7VvRHpNGed/iW8RmAdZEA1FiyDZ+RHC +HaiyaVq/yfhAQDldy2LMQgaduNm6G1KZd0VbPLA1rmW+tHTcSVPZlYy4ZrbX/yB+C 4w2h1XuNXdu3vmNiHCGSKrceByJrKJOW6TR1KGonzQpcbeU3Rwftbf0mJk11j7+A0N fynoePthy+GEA== Date: Wed, 3 Jul 2024 16:58:01 +0900 Message-ID: <856227e921e654836b68c7927ed0f9e4da5cb815.1719992277.git.mcsinyx@disroot.org> In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: =?utf-8?b?Tmd1eeG7hW4=?= Gia Phong X-ACL-Warn: , =?utf-8?q?Nguy=E1=BB=85n_Gia_Phong_via_Guix-patches?= X-Patchwork-Original-From: guix-patches--- via From: "ashish.is--- via Guix-patches\" via" Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * 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 ;;; Copyright © 2024 normally_js ;;; Copyright © 2024 Markku Korkeala +;;; Copyright © 2024 Nguyễn Gia Phong ;;; ;;; 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")