guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/03: gnu: Add python-deepmerge.


From: guix-commits
Subject: 01/03: gnu: Add python-deepmerge.
Date: Sun, 1 May 2022 06:56:39 -0400 (EDT)

mothacehe pushed a commit to branch master
in repository guix.

commit 33366f196e01f759228cf532a415a356dcc24222
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Sun May 1 12:48:02 2022 +0200

    gnu: Add python-deepmerge.
    
    * gnu/packages/python-xyz.scm (python-deepmerge): New variable.
    
    Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
---
 gnu/packages/python-xyz.scm | 45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 2bfe6745d9..7391b17b77 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -29606,3 +29606,48 @@ to Github via gh-pages.")
      "The @code{flatten_json} Python library flattens the hierarchy in your
 object, which can be useful if you want to force your objects into a table.")
     (license license:expat)))
+
+(define-public python-deepmerge
+  (package
+    (name "python-deepmerge")
+    (version "1.0.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "deepmerge" version))
+       (sha256
+        (base32 "06hagzg8ccmjzqvszdxb52jgx5il8a1jdz41n4dpkyyjsfg7fi2b"))))
+    (build-system python-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'build 'set-version
+            (lambda _
+              (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)
+              ;; ZIP does not support timestamps before 1980.
+              (setenv "SOURCE_DATE_EPOCH" "315532800")))
+          (replace 'build
+            (lambda _
+              (invoke "python" "-m" "build" "--wheel"
+                      "--no-isolation" ".")))
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (invoke "pytest"))))
+          (replace 'install
+            (lambda _
+              (let ((whl (car (find-files "dist" "\\.whl$"))))
+                (invoke "pip" "--no-cache-dir" "--no-input"
+                        "install" "--no-deps" "--prefix" #$output whl)))))))
+    (native-inputs
+     (list python-pypa-build
+           python-setuptools-scm
+           python-pytest
+           python-wheel))
+    (home-page "https://deepmerge.readthedocs.io/en/latest/";)
+    (synopsis "Merge nested data structures")
+    (description
+     "The @code{deep-merge} Python library provides a toolset to deeply merge
+nested data structures in Python like lists and dictionaries.")
+    (license license:expat)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]