From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id EDJSNMXYsmXMHwAA62LTzQ:P1 (envelope-from ) for ; Thu, 25 Jan 2024 22:55:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id EDJSNMXYsmXMHwAA62LTzQ (envelope-from ) for ; Thu, 25 Jan 2024 22:55:17 +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=Ehs+Vi23; 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=1706219717; a=rsa-sha256; cv=none; b=FUh3JrMZ3RSQmkprM2tuiEUwx1HZWVYwBKnOBkQ8JFDk7PJxlUJRXpjrsJyRIwDVhKn5AI uXTkuNxjtyJ22P9xD7uHUgX2G6AlLMVgH5JOCDlQQ/5MuF8yUGnoZ+Ni0b4jNwhwzk0laH UyRdccjP5YV9XwbKPlBZiW1A5JRv+NLuMFQG455HD7YwGFOCJ/KnT1xoXCqBx3YsPVIHB5 cYunTm1QcYYDXhlVu7VwXQSw0UJ0DP262Vf9B9gWKZ2tNv2vQwM9a6SZlPVrw69PO/s8Gr cBoAI31ZgufrjBwTeqwRstQI+AO4bIuvbOry9xxI4a+0a8jlbr4sd0YtNjgjuw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=troyfigiel.com header.s=MBO0001 header.b=Ehs+Vi23; 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=1706219717; 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=YA+phpn8gPOBGEgeWShDRsT1ta5FdmEwrJsKfnsdqfmfPOb/wsWD9NBjtWhto9CwGyRzGG UHcYW2sUgN3/Pi+ixaKU9qu8dqfH5A5w8aBf3nLVMWohRpNKAoFDMMdlxKBT25voywg3er wJibMQ2HgePHbgothuYxTX/olcOl7yG3L5k00t6wA9PlXl86boLWSppGSd+U3EyNWIOEMT cstYy4B7WcXKCX319zZN917VjDqG8+llJPycMG67I0LoYOIsKbhOJ4kdOFCUZQSnT9QnNf zGajw3LrpeinVpxulILqAMRnFI26jg5KlyVzBUrHvY/c2+Z4OUCZMaapriDn6w== 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 78DCD75352 for ; Thu, 25 Jan 2024 22:55:17 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rT7gY-0001mb-Da; Thu, 25 Jan 2024 16:54:58 -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 1rT7gW-0001mS-HT for guix-patches@gnu.org; Thu, 25 Jan 2024 16:54:56 -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 1rT7gV-0007Vu-Nt for guix-patches@gnu.org; Thu, 25 Jan 2024 16:54:56 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rT7gb-0002fC-Oz for guix-patches@gnu.org; Thu, 25 Jan 2024 16:55:01 -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: Thu, 25 Jan 2024 21:55:01 +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.170621967310193 (code B ref 68721); Thu, 25 Jan 2024 21:55:01 +0000 Received: (at 68721) by debbugs.gnu.org; 25 Jan 2024 21:54:33 +0000 Received: from localhost ([127.0.0.1]:49440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rT7g8-0002eK-Tk for submit@debbugs.gnu.org; Thu, 25 Jan 2024 16:54:33 -0500 Received: from mout-p-102.mailbox.org ([80.241.56.152]:37636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rT7g7-0002e3-62 for 68721@debbugs.gnu.org; Thu, 25 Jan 2024 16:54:31 -0500 Received: from smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (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-102.mailbox.org (Postfix) with ESMTPS id 4TLZNT2z7Sz9spm for <68721@debbugs.gnu.org>; Thu, 25 Jan 2024 22:54:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=troyfigiel.com; s=MBO0001; t=1706219657; 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=Ehs+Vi23jNbPIR1CREEuxOJGR613xcryLSueRKlM7w2K5B5JqZso3/ho0NFhKVb41k334g JACtfZw1icbw86qsRRciMe8Vo/H4VnRHnh6xTeCmrEjtYCPfbpA2TAY9BK14VVfQ4M/B+K vGx74EXmZM6UBl7zACccB3YKJH4hjX5Je9gxzvBfh0QXjxZH0CNDnXJ3JecgmjgQXcqjDN 4a2JL0w+pSsrdkycyDM8P2239cXva+c0Li8iU/O61Xijgk/JQFu2Ynb7zqDCCSIHTdMgGj BeGs5ZsayRqoAm+W0oLDh5Eiun4aLE8D2m3LSl1vpZBbA8LEgV/7zDKuAZ/y9Q== From: Troy Figiel Date: Thu, 25 Jan 2024 21:39:50 +0100 Message-ID: <87jznxgjuf.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-Scanner: mx10.migadu.com X-Spam-Score: -5.67 X-Migadu-Queue-Id: 78DCD75352 X-Migadu-Spam-Score: -5.67 X-TUID: ry7t/u9AV3EU * 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