From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id eMdNNs9042XT7wAAqHPOHw:P1 (envelope-from ) for ; Sat, 02 Mar 2024 19:49:52 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id eMdNNs9042XT7wAAqHPOHw (envelope-from ) for ; Sat, 02 Mar 2024 19:49:52 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=troyfigiel.com header.s=MBO0001 header.b=ols+e5aZ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=troyfigiel.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1709405391; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=hUQxsBgsz+E1FJjYZksxD97udWTTTKS64VJhz02Hru0=; b=LAVPF3UXVBaq6yzlwIfZcHNZho1b5hfD3OM1Je8yym8O4D6H32cjfICX0XW0Joc0OB7UMN u6NDWTrwbl4iTIgfESxuGBBSyVK4ZzekJB+Vlg7hQdgpnf7kkxOCUqzh+loVvaTwRCsfmw lTY6sEBn00LfmpykCkoF6nO4qHM+T2mcmBkIBQNvkNFWfGoI27r4Nnzo3Xcv2xEQeZeuxn cUALRvZQ3xBA1Wz0Sq2X16gKap6WEuqnY9xqnzMVZ24tLDa7ML5FUf2YX3LVbI4h5B38FK 4pSmzlxzbogn8Kz+r/EEpmCNybHOXSxTKUFEyt7Qk604r3RDBccIY4WF9fyWHA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=troyfigiel.com header.s=MBO0001 header.b=ols+e5aZ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=troyfigiel.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1709405391; a=rsa-sha256; cv=none; b=SYsiW/ttGB9RWRN/ZFEiYnbwaSJX/1lubZIuuu0Cs5OBmH1EtitUmWozqxsAUV2HCo1awC sNQGuD63B3Jaf6rWA3f9EGWQq1HMmW39QMoRS0VtJiwQVcfhLxi+MVlSKPjl0sCFXjU2dZ q+JZ+9mDqabkVke9NNERguP3zo1ZgXTz2CdeEDwIFZ1l8gXm6zodfKo2yIJ8bljpXvsJni HCLpz1h+T15y3bclUn4AfA6jrveMosMHFDYJpbxq3dV9lhL+dQ9K7HqHpQLWlJrYVGOF9i u6D8r34Mx/aGRHZDbLMLpdUdxWhJaupPr/YC1iYjfSZ5qDiZGroAqM4HttHpkA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7B0A24277E for ; Sat, 2 Mar 2024 19:49:51 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rgUQU-0004lK-Fk; Sat, 02 Mar 2024 13:49:38 -0500 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 1rgUQQ-0004kq-7H for guix-patches@gnu.org; Sat, 02 Mar 2024 13:49:34 -0500 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 1rgUQP-0002ac-VD for guix-patches@gnu.org; Sat, 02 Mar 2024 13:49:33 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rgUQs-00075L-EQ for guix-patches@gnu.org; Sat, 02 Mar 2024 13:50:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68721] [PATCH 1/2] gnu: Add python-cramjam. References: <87le8dgjyu.fsf@troyfigiel.com> In-Reply-To: <87le8dgjyu.fsf@troyfigiel.com> Resent-From: Troy Figiel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 02 Mar 2024 18:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68721 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68721@debbugs.gnu.org Received: via spool by 68721-submit@debbugs.gnu.org id=B68721.170940536927168 (code B ref 68721); Sat, 02 Mar 2024 18:50:02 +0000 Received: (at 68721) by debbugs.gnu.org; 2 Mar 2024 18:49:29 +0000 Received: from localhost ([127.0.0.1]:39370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rgUQK-000747-Qi for submit@debbugs.gnu.org; Sat, 02 Mar 2024 13:49:29 -0500 Received: from mout-p-201.mailbox.org ([80.241.56.171]:36888) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rgUQI-00073F-Ab for 68721@debbugs.gnu.org; Sat, 02 Mar 2024 13:49:27 -0500 Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4TnDVr2XF9z9t0C for <68721@debbugs.gnu.org>; Sat, 2 Mar 2024 19:48:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=troyfigiel.com; s=MBO0001; t=1709405300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hUQxsBgsz+E1FJjYZksxD97udWTTTKS64VJhz02Hru0=; b=ols+e5aZ7V/fPaGaOHPKKqoow5mWpeLvON45744N8FbXn3uNjU9H3zOpuzp6AiUUKlsyTr MQONFjXQL+i2BufpNDHYGHCycD7/mKUWW9SFUAosBJopoOWi4sHd3+ld7c+Ookoj7lDW9r kjWCcqJkD+C1Mzbt5mSi8jaGF/QokzrlyfHFV/Zs2mG4LPDIyTKqec14Khfk7MwIEKGXIY CtkQa6VmT7EBBuV9zb5h/LqJOmDmUHcPyDSzJgf5EYGsim5dI+6U5NUGnngs+Q8Vnj0auz dYGez1IuLdM+Zhd4cRLrFV52GQuJijt0la5gDZ5CZKp+7wnYr6pJ3tO+8LmVrA== From: Troy Figiel Date: Sat, 2 Mar 2024 19:40:21 +0100 Message-ID: <87zfvgpj0s.fsf@troyfigiel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 2.63 X-Spam-Score: 2.63 X-Migadu-Queue-Id: 7B0A24277E X-Migadu-Scanner: mx13.migadu.com X-TUID: KFTLhhl2hcxR * gnu/packages/python-compression.scm (python-cramjam): New variable. --- gnu/packages/python-compression.scm | 80 ++++++++++++++++++++++++++++- 1 file changed, 79 insertions(+), 1 deletion(-) diff --git a/gnu/packages/python-compression.scm b/gnu/packages/python-comp= ression.scm index 6f249dd3af..691fbd3065 100644 --- a/gnu/packages/python-compression.scm +++ b/gnu/packages/python-compression.scm @@ -7,7 +7,7 @@ ;;; Copyright =C2=A9 2020 Nicolas Goaziou ;;; Copyright =C2=A9 2020, 2022, 2023 Marius Bakke ;;; Copyright =C2=A9 2021 Brendan Tildesley -;;; Copyright =C2=A9 2023 Troy Figiel +;;; Copyright =C2=A9 2023, 2024 Troy Figiel ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,12 +30,14 @@ (define-module (gnu packages python-compression) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix gexp) + #:use-module (guix build-system cargo) #:use-module (guix build-system gnu) #:use-module (guix build-system python) #:use-module (guix build-system pyproject) #:use-module (gnu packages) #:use-module (gnu packages libffi) #:use-module (gnu packages compression) + #:use-module (gnu packages crates-io) #:use-module (gnu packages check) #:use-module (gnu packages maths) #:use-module (gnu packages pkg-config) @@ -44,6 +46,7 @@ (define-module (gnu packages python-compression) #:use-module (gnu packages python-check) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-xyz) + #:use-module (gnu packages rust-apps) #:use-module (gnu packages sphinx)) =20 (define-public python-multivolumefile @@ -73,6 +76,81 @@ (define-public python-multivolumefile were a single file.") (license license:lgpl2.1+))) =20 +(define-public python-cramjam + (package + (name "python-cramjam") + (version "2.7.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "cramjam" version)) + (sha256 + (base32 "1b69qlr0q7q3spa7zy55xc1dr5pjgsdavxx8ijhv2j60xqjbg7sp")))) + (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 + ;; We use Maturin to build the project. + (replace 'build + (assoc-ref py:%standard-phases + 'build)) + ;; Before being able to run Python tests, we need to + ;; install the module and add it to PYTHONPATH. + (delete 'install) + (add-after 'build 'install + (assoc-ref py:%standard-phases + 'install)) + (add-after 'install 'add-install-to-pythonpath + (assoc-ref py:%standard-phases + 'add-install-to-pythonpath)) + ;; Finally run the tests. Only Python tests are provide= d. + (replace 'check + (lambda* (#:key tests? inputs outputs #:allow-other-k= eys) + (when tests? + ;; Without the CI variable, tests are run in "loc= al" + ;; mode, which sets a deadline for hypothesis. F= or a + ;; deterministic build, we need to set CI. + (setenv "CI" "1") + (invoke "pytest" "-vv" "tests"))))) + #:cargo-inputs `(("rust-brotli" ,rust-brotli-3) + ("rust-bzip2" ,rust-bzip2-0.4) + ("rust-flate2" ,rust-flate2-1) + ("rust-lz4" ,rust-lz4-1) + ("rust-pyo3" ,rust-pyo3-0.18) + ("rust-snap" ,rust-snap-1) + ("rust-zstd" ,rust-zstd-0.11)) + #:install-source? #f)) + (native-inputs (list maturin + python-pytest + python-pytest-xdist + python-numpy + python-hypothesis + python-wrapper)) + (home-page "https://github.com/milesgranger/cramjam") + (synopsis "Python bindings to compression algorithms in Rust") + (description + "This package provides thin Python bindings to compression and +decomporession algorithms implemented in Rust. This allows for using +algorithms such as Snappy without additional system dependencies. The +following algorithms are available: + +@itemize +@item Snappy +@item Brotli +@item Bzip2 +@item LZ4 +@item Gzip +@item Deflate +@item Zstd +@end itemize") + (license license:expat))) + (define-public python-pybcj (package (name "python-pybcj") --=20 2.42.0