GNU bug report logs - #59281
[PATCH] gnu: Add python-dm-tree.

Previous Next

Package: guix-patches;

Reported by: Nicolas Graves <ngraves <at> ngraves.fr>

Date: Tue, 15 Nov 2022 08:40:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 59281 in the body.
You can then email your comments to 59281 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#59281; Package guix-patches. (Tue, 15 Nov 2022 08:40:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nicolas Graves <ngraves <at> ngraves.fr>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Tue, 15 Nov 2022 08:40:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: guix-patches <at> gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH] gnu: Add python-dm-tree.
Date: Tue, 15 Nov 2022 09:38:52 +0100
* 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 <mlaparie <at> disr.it>
 ;;; Copyright © 2022 Garek Dyszel <garekdyszel <at> disroot.org>
 ;;; Copyright © 2022 Baptiste Strazzulla <bstrazzull <at> hotmail.fr>
+;;; Copyright © 2022 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; 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





Information forwarded to guix-patches <at> gnu.org:
bug#59281; Package guix-patches. (Tue, 15 Nov 2022 20:04:02 GMT) Full text and rfc822 format available.

Message #8 received at 59281 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Graves <ngraves <at> ngraves.fr>
To: 59281 <at> debbugs.gnu.org
Cc: ngraves <at> ngraves.fr
Subject: [PATCH] gnu: Add python-dm-tree.
Date: Tue, 15 Nov 2022 21:03:05 +0100
* 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 <mlaparie <at> disr.it>
 ;;; Copyright © 2022 Garek Dyszel <garekdyszel <at> disroot.org>
 ;;; Copyright © 2022 Baptiste Strazzulla <bstrazzull <at> hotmail.fr>
+;;; Copyright © 2022 Nicolas Graves <ngraves <at> ngraves.fr>
 ;;;
 ;;; 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





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Mon, 28 Nov 2022 22:31:02 GMT) Full text and rfc822 format available.

Notification sent to Nicolas Graves <ngraves <at> ngraves.fr>:
bug acknowledged by developer. (Mon, 28 Nov 2022 22:31:02 GMT) Full text and rfc822 format available.

Message #13 received at 59281-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Nicolas Graves <ngraves <at> ngraves.fr>
Cc: 59281-done <at> debbugs.gnu.org
Subject: Re: bug#59281: [PATCH] gnu: Add python-dm-tree.
Date: Mon, 28 Nov 2022 23:29:57 +0100
Hi,

Nicolas Graves <ngraves <at> ngraves.fr> skribis:

> * gnu/packages/python-xyz.scm (python-dm-tree): New variable.

Applied with cosmetic changes, primarily to remove the hardcoded “3.9”
Python version number.

Thanks,
Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 27 Dec 2022 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 177 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.