From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id sG+NG3hQc2NCNwEAbAwnHQ (envelope-from ) for ; Tue, 15 Nov 2022 09:40:24 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id cHOiGnhQc2Pq9gAAG6o9tA (envelope-from ) for ; Tue, 15 Nov 2022 09:40:24 +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 100197513 for ; Tue, 15 Nov 2022 09:40:24 +0100 (CET) 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) 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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=1668501624; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=CvnMlzLAa4owcgLLqnLURRfjYCQVRwCYYaWQQ3jXnQI=; b=YUdkw0wq7DvNDxX/hSMwYYuuBFrIqqn6Mtcjsz+9WTligvp7yaujr3+UZicEsniW06h1kG G8nyx//t8sF70CkFnZlvQSkGMbqfuXst+Y4nRXH/45gYZn7WZIVYJPo8stftrOrP8x86lS 5rKU1AcZJ57Wrr3OyBfYVmNin7WOBI+4noenvHU8ajlX+6Y8Ll76yakfr4K3zh3cTa+4Wl 5T6uyKMjo0V58cTkIVRfwyOTTX29J1Oa+0w0LBLNRaqQYJ73ZIvDtIu2tCxl+aNpFQriqf jM/nwobaTe0NRZ1+m3bHyewt4pqzX6hzSqvDHaoaTOwWftRLA634amcBeBb74g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1668501624; a=rsa-sha256; cv=none; b=l9ZDAWJO2hoBDHCtoElIy37lhK3AtqkgjjXPHYXOJ8L8WndYdZfNID/IEWxrX9f3O6Y7d+ NRbcX6hNKZBl6lNti6JSes21z1enrvNEzEYA/8fNJZ2u88CWcQXnjbVW/keoURo7Eihv8j 5v5lq9NJg0j6XS/YbcdHr5iRcIwWxEUpFarkOWoACLmZfO07iDltcRkm6w4FZ1Qpt+FHW4 W44nbOtDSiQZkcgjHp5gRIf97LNfLeiIgH6Tk6pOOqLclZP6AqYDLggl+iHTEihDQA3I55 smR6vOp5Er6mNtAFQPG0uwVmEkSFBOa78id518ln8iv524C+Qr46nswuJiTWrg== 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: -5.24 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: 100197513 X-Spam-Score: -5.24 X-Migadu-Scanner: scn0.migadu.com X-TUID: 9vFZdLzUOa6J * 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") -- 2.38.1