From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WKiKLsnwc2PTlAAAbAwnHQ (envelope-from ) for ; Tue, 15 Nov 2022 21:04:25 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id AMOBLsnwc2NIRgEA9RJhRA (envelope-from ) for ; Tue, 15 Nov 2022 21:04:25 +0100 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 387581BB17 for ; Tue, 15 Nov 2022 21:04:25 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ov2AL-0007SA-DZ; Tue, 15 Nov 2022 15:04:17 -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 1ov2A7-0007PP-Hn for guix-patches@gnu.org; Tue, 15 Nov 2022 15:04:15 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ov2A6-0007m3-9c for guix-patches@gnu.org; Tue, 15 Nov 2022 15:04:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ov2A6-0000d7-57 for guix-patches@gnu.org; Tue, 15 Nov 2022 15:04:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59281] [PATCH] gnu: Add python-dm-tree. References: <20221115083852.8994-1-ngraves@ngraves.fr> In-Reply-To: <20221115083852.8994-1-ngraves@ngraves.fr> Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 15 Nov 2022 20:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59281 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59281@debbugs.gnu.org Cc: ngraves@ngraves.fr Received: via spool by 59281-submit@debbugs.gnu.org id=B59281.16685425952367 (code B ref 59281); Tue, 15 Nov 2022 20:04:02 +0000 Received: (at 59281) by debbugs.gnu.org; 15 Nov 2022 20:03:15 +0000 Received: from localhost ([127.0.0.1]:55330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ov29L-0000c7-0j for submit@debbugs.gnu.org; Tue, 15 Nov 2022 15:03:15 -0500 Received: from 8.mo560.mail-out.ovh.net ([188.165.52.147]:49779) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ov29I-0000bx-1q for 59281@debbugs.gnu.org; Tue, 15 Nov 2022 15:03:13 -0500 Received: from player793.ha.ovh.net (unknown [10.111.208.129]) by mo560.mail-out.ovh.net (Postfix) with ESMTP id 40DEA23C93 for <59281@debbugs.gnu.org>; Tue, 15 Nov 2022 20:03:09 +0000 (UTC) Received: from ngraves.fr (81-67-140-142.rev.numericable.fr [81.67.140.142]) (Authenticated sender: ngraves@ngraves.fr) by player793.ha.ovh.net (Postfix) with ESMTPSA id 80FD530BFCAE2; Tue, 15 Nov 2022 20:03:07 +0000 (UTC) X-OVh-ClientIp: 81.67.140.142 Date: Tue, 15 Nov 2022 21:03:05 +0100 Message-Id: <20221115200305.17761-1-ngraves@ngraves.fr> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 17328725469777814242 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvgedrgeeggddufeefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffogggtgfesthekredtredtjeenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpeelueehgfevfeevhffftdetgedugeevveehteeileeuueejhfegffetteffhffhvdenucffohhmrghinhepghhithhhuhgsrdgtohhmnecukfhppeduvdejrddtrddtrddupdekuddrieejrddugedtrddugedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopeehledvkeduseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehiedtpdhmohguvgepshhmthhpohhuth 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: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches From: Nicolas Graves via Guix-patches via 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1668542665; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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; bh=0F0FttFBp9IH0O1LWHD9WjA7CNF6nVEAVGDTkq2wEno=; b=QHiyO+AXEHf5Fz2aSYsZ2JY3bOZ85a6B0OhTa02ndjEk69jtJ3TLwPZbYA2IbHlEVNs2Gx gahDOcMHLFpTTXHQ2D/YKmq0DEL5fiShmeAaZiImErlc0vuAepfxs0KoNdtMnzAKFuDxgK NSOCyYWzAQLkJ0vf7AO/L/mzN/vGd7AtKiirHfu0ZhhIMZQQtrL8DX+wCCdpJ0yCl/g1es ccj4EumpuBlg2OaYxQ31VzWTFUYvzwhnLmytPEYdgL2jrDues9Rm7XLqdfyjzKTqHO7ZRh eYQhkpQEtI3DuiViN8DtG0qL0FOV+FtLwP1IaWRup0KunsMH8jc0U5ejugbVnA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1668542665; a=rsa-sha256; cv=none; b=OfFOqyFSKtabAmE//8rlZ6q4DgA8d60T58RpqXsY9IiJsn6+fWrGn34nBBA2w7wZHXKlGF EG0KVHSy8PQrlfwawpMbxUtwBI49N+OJmkJYNa+dUYlA4+dhBeZMJ/i9PTFPbLdd78/Cbn HuDK2JxXo5b/Ae19k82cfBK5F40KfPXODo3lUQRGnS+c1eviuBH4FGCt2KZQrRcrfn1lwQ 8CJhzVmbEWZapFlR7tRXupM573MP7SlrJrhl/kdpn1AJOpmoCmveryCt5123GvN65B6puu EnhGpG6EMonXLF39ekeyeq3jfXa1o/CR1CEqDIsYjEqgSMsWCcmoYKqifpxDpQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Spam-Score: -3.54 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Queue-Id: 387581BB17 X-Spam-Score: -3.54 X-Migadu-Scanner: scn1.migadu.com X-TUID: ATMqGo2bFSXL * gnu/packages/python-xyz.scm (python-dm-tree): New variable. --- gnu/packages/python-xyz.scm | 68 +++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 1758450c2f..fafacc4d94 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -131,6 +131,7 @@ ;;; Copyright © 2022 Mathieu Laparie ;;; Copyright © 2022 Garek Dyszel ;;; Copyright © 2022 Baptiste Strazzulla +;;; Copyright © 2022 Nicolas Graves ;;; ;;; This file is part of GNU Guix. ;;; @@ -159,6 +160,7 @@ (define-module (gnu packages python-xyz) #:use-module (gnu packages check) #:use-module (gnu packages cmake) #:use-module (gnu packages compression) + #:use-module (gnu packages cpp) #:use-module (gnu packages crypto) #:use-module (gnu packages databases) #:use-module (gnu packages dbm) @@ -4618,6 +4620,72 @@ (define-public autokey flexibility and power of the Python language.") (license license:gpl3+))) +(define-public python-dm-tree + (package + (name "python-dm-tree") + (version "0.1.7") + (source + (origin + (method url-fetch) + (uri (pypi-uri "dm-tree" version)) + (sha256 + (base32 "0apxfxgmqh22qpk92zmmf3acqkavhwxz78lnwz026a5rlnncizih")))) + (build-system python-build-system) + (inputs (list pybind11 abseil-cpp python)) + (propagated-inputs (list python-wheel + python-absl-py + python-attrs + python-numpy + python-wrapt)) + (arguments + (list + #:tests? #f + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'build-shared-lib + (lambda _ + (let* ((pybind11 #$(this-package-input "pybind11")) + (python #$(this-package-input "python")) + (abseil-cpp #$(this-package-input "abseil-cpp"))) + ;; Delete default cmake build. + (substitute* "setup.py" + (("ext_modules.*") "") + (("cmdclass.*") "")) + ;; Actual build phase. + (mkdir-p "build/temp/tree/") + (invoke + "gcc" "-pthread" "-Wno-unused-result" "-Wsign-compare" + "-DNDEBUG" "-g" "-fwrapv" "-O3" "-Wall" + "-fno-semantic-interposition" "-fPIC" + "-I" (string-append + pybind11 "/lib/python3.9/site-packages/pybind11/include") + "-I" (string-append python "/include/python3.9") + "-I" (string-append abseil-cpp "/include") + "-c" "tree/tree.cc" + "-o" "build/temp/tree/tree.o" + "-fvisibility=hidden" "-g0") + (mkdir-p "build/lib/tree") + (invoke + "g++" "-pthread" "-shared" + (string-append "-Wl," "-rpath=" python "/lib") + "-fno-semantic-interposition" + "build/temp/tree/tree.o" + "-L" (string-append python "/lib") + "-L" (string-append abseil-cpp "/lib") + "-l" "absl_int128" + "-l" "absl_raw_hash_set" + "-l" "absl_raw_logging_internal" + "-l" "absl_strings" + "-l" "absl_throw_delegate" + "-o" "build/lib/tree/_tree.so"))))))) + (home-page "https://github.com/deepmind/tree") + (synopsis "Work with nested data structures in python.") + (description "Tree is a python library for working with nested +data structures. In a way, @code{tree} generalizes the builtin map +function which only supports flat sequences, and allows to apply a +function to each leaf preserving the overall structure.") + (license license:asl2.0))) + (define-public python-docutils (package (name "python-docutils") -- 2.38.1