guix-commits
[Top][All Lists]
Advanced

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

01/04: gnu: Add python-stone.


From: guix-commits
Subject: 01/04: gnu: Add python-stone.
Date: Mon, 28 Dec 2020 02:59:40 -0500 (EST)

efraim pushed a commit to branch master
in repository guix.

commit af196f3bb0521dac31172cb6905e680392d10eac
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Mon Dec 28 09:52:33 2020 +0200

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index acde5a5..15b8d96 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -18722,6 +18722,56 @@ implemented using @code{ctypes}.")
 user-space file systems in Python.")
     (license license:gpl3+)))
 
+(define-public python-stone
+  (package
+    (name "python-stone")
+    (version "3.2.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "stone" version))
+        (sha256
+         (base32
+          "0xby5mpsms7b2rv8j6mvxzmzz5i9ii01brb9ylxz6kiv2i08piwv"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'change-version-requirements
+           (lambda _
+             ;; Match the requirement in test/requirements.txt
+             (substitute* "setup.py"
+               (("pytest < 5") "pytest < 7"))
+             ;; We don't care about a coverage report.
+             (substitute* "test/requirements.txt"
+               (("coverage.*") "coverage\n"))
+             #t))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               ;; These tests don't import currectly.
+               (delete-file "test/test_js_client.py")
+               (delete-file "test/test_tsd_types.py")
+               (delete-file "test/test_python_gen.py")
+               (setenv "PYTHONPATH"
+                       (string-append (getcwd) ":"
+                                      (getenv "PYTHONPATH")))
+               (invoke "pytest"))
+             #t)))))
+    (propagated-inputs
+     `(("python-ply" ,python-ply)
+       ("python-six" ,python-six)))
+    (native-inputs
+     `(("python-coverage" ,python-coverage)
+       ("python-mock" ,python-mock)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-runner" ,python-pytest-runner)))
+    (home-page "https://github.com/dropbox/stone";)
+    (synopsis "Official Api Spec Language for Dropbox")
+    (description
+     "Stone is an interface description language (IDL) for APIs.")
+    (license license:expat)))
+
 (define-public pybind11
   (package
     (name "pybind11")



reply via email to

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