guix-commits
[Top][All Lists]
Advanced

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

01/02: gnu: Add python-jsonschema-next.


From: guix-commits
Subject: 01/02: gnu: Add python-jsonschema-next.
Date: Wed, 1 Jun 2022 20:56:59 -0400 (EDT)

apteryx pushed a commit to branch master
in repository guix.

commit 4f3011f21c46c2eec6fa4256bfb00052aa9512c9
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Wed Jun 1 11:36:10 2022 -0400

    gnu: Add python-jsonschema-next.
    
    * gnu/packages/python-xyz.scm (python-jsonschema-next): New variable.
---
 gnu/packages/python-xyz.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 8088761f0f..91bed915d8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -3424,6 +3424,42 @@ compare, diff, and patch JSON and JSON-like structures 
in Python.")
      "Jsonschema is an implementation of JSON Schema for Python.")
     (license license:expat)))
 
+;;; TODO: Make the default python-jsonschema on core-updates
+(define-public python-jsonschema-next
+  (package
+    (inherit python-jsonschema)
+    (version "4.5.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "jsonschema" version))
+       (sha256
+        (base32 "1z0x22691jva7lwfcfh377jdmlz68zhiawxzl53k631l34k8hvbw"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments python-jsonschema)
+       ((#:phases phases)
+        #~(modify-phases #$phases
+            ;; XXX: PEP 517 manual build/install procedures copied from
+            ;; python-isort.
+            (replace 'build
+              (lambda _
+                ;; ZIP does not support timestamps before 1980.
+                (setenv "SOURCE_DATE_EPOCH" "315532800")
+                (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
+            (replace 'install
+              (lambda* (#:key outputs #:allow-other-keys)
+                (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-twisted))
+    (propagated-inputs
+     (list python-attrs
+           python-importlib-metadata
+           python-pyrsistent
+           python-typing-extensions))))
+
 (define-public python-schema
   (package
     (name "python-schema")



reply via email to

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