From patchwork Tue Nov 15 08:38:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nicolas Graves X-Patchwork-Id: 44521 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 246D727BBEB; Tue, 15 Nov 2022 08:40:26 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,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 CAC6B27BBE9 for ; Tue, 15 Nov 2022 08:40:23 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ourUH-0006iE-89; Tue, 15 Nov 2022 03:40:11 -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 1ourUA-0006hu-7i for guix-patches@gnu.org; Tue, 15 Nov 2022 03:40:03 -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 1ourU9-0002hB-Uu for guix-patches@gnu.org; Tue, 15 Nov 2022 03:40:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ourU9-0000XD-Qr for guix-patches@gnu.org; Tue, 15 Nov 2022 03:40:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59281] [PATCH] gnu: Add python-dm-tree. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 15 Nov 2022 08:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59281 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59281@debbugs.gnu.org Cc: ngraves@ngraves.fr X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16685015571983 (code B ref -1); Tue, 15 Nov 2022 08:40:01 +0000 Received: (at submit) by debbugs.gnu.org; 15 Nov 2022 08:39:17 +0000 Received: from localhost ([127.0.0.1]:52844 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ourTQ-0000Vu-E9 for submit@debbugs.gnu.org; Tue, 15 Nov 2022 03:39:16 -0500 Received: from lists.gnu.org ([209.51.188.17]:35476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ourTP-0000Vm-0s for submit@debbugs.gnu.org; Tue, 15 Nov 2022 03:39:15 -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 1ourTL-0006f3-5i for guix-patches@gnu.org; Tue, 15 Nov 2022 03:39:13 -0500 Received: from 8.mo560.mail-out.ovh.net ([188.165.52.147]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ourTI-0002dA-8y for guix-patches@gnu.org; Tue, 15 Nov 2022 03:39:10 -0500 Received: from player690.ha.ovh.net (unknown [10.108.4.98]) by mo560.mail-out.ovh.net (Postfix) with ESMTP id CE56824714 for ; Tue, 15 Nov 2022 08:38:55 +0000 (UTC) Received: from ngraves.fr (81-67-140-142.rev.numericable.fr [81.67.140.142]) (Authenticated sender: ngraves@ngraves.fr) by player690.ha.ovh.net (Postfix) with ESMTPSA id 3EE5E309C8776; Tue, 15 Nov 2022 08:38:54 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-100R003b52989ae-383b-4b8e-ab23-c63843e79ebb, 2F6105918EBEC42D628EBADD442E48203073A816) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 81.67.140.142 Date: Tue, 15 Nov 2022 09:38:52 +0100 Message-Id: <20221115083852.8994-1-ngraves@ngraves.fr> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Ovh-Tracer-Id: 5773333249727128290 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvgedrgeefgdduvddvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffogggtgfesthekredtredtjeenucfhrhhomheppfhitgholhgrshcuifhrrghvvghsuceonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqeenucggtffrrghtthgvrhhnpeelueehgfevfeevhffftdetgedugeevveehteeileeuueejhfegffetteffhffhvdenucffohhmrghinhepghhithhhuhgsrdgtohhmnecukfhppeduvdejrddtrddtrddupdekuddrieejrddugedtrddugedvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpeeonhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrqedpnhgspghrtghpthhtohepuddprhgtphhtthhopehguhhigidqphgrthgthhgvshesghhnuhdrohhrghdpoffvtefjohhsthepmhhoheeitddpmhhouggvpehsmhhtphhouhht Received-SPF: pass client-ip=188.165.52.147; envelope-from=ngraves@ngraves.fr; helo=8.mo560.mail-out.ovh.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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 X-Patchwork-Original-From: Nicolas Graves via Guix-patches via From: Nicolas Graves 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-xyz.scm (python-dm-tree): New variable. --- gnu/packages/python-xyz.scm | 65 +++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 7e10682e69..7e66a69273 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) @@ -4631,6 +4633,69 @@ (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) + (native-inputs (list python-wheel + python-absl-py + python-attrs + python-numpy + python-wrapt)) + (inputs (list pybind11 abseil-cpp)) + (arguments + (list + #:tests? #f + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'build-shared-lib + (lambda _ + ;; Delete default cmake build. + (substitute* "setup.py" + (("ext_modules.*") "") + (("cmdclass.*") "")) + ;; Actual build phase. + (mkdir-p "build/temp.linux-x86_64-3.9/tree/") + (invoke + "gcc" "-pthread" "-Wno-unused-result" "-Wsign-compare" + "-DNDEBUG" "-g" "-fwrapv" "-O3" "-Wall" + "-fno-semantic-interposition" "-fPIC" + "-I" #$(file-append + pybind11 "/lib/python3.9/site-packages/pybind11/include") + "-I" #$(file-append python "/include/python3.9") + "-I" #$(file-append abseil-cpp "/include") + "-c" "tree/tree.cc" + "-o" "build/temp.linux-x86_64-3.9/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.linux-x86_64-3.9/tree/tree.o" + "-L" #$(file-append python "/lib") + "-L" #$(file-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")