diff mbox series

[bug#52064] gnu: Add python-sodapy.

Message ID G2tTpXOZFA9mOE-JxQJ4kmaAhSiDWG8lANC5lqpLTjnuIEW_jv7Qlx3iBQzxWuuTo2D48AXfFtfzkxkDamNwCuq2uHVgO2cjmhTStshhY-U=@protonmail.com
State New
Headers show
Series [bug#52064] gnu: Add python-sodapy. | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Luis Felipe Nov. 25, 2021, 6:14 p.m. UTC
Hi. Here's the new package definition with check phase enabled.

---
Luis Felipe López Acevedo

Comments

Maxim Cournoyer Jan. 4, 2023, 1:08 a.m. UTC | #1
Hi Luis Felipe,

Unfortunately sodapy is not maintained anymore (see:
https://github.com/xmunoz/sodapy), so I think it'd be best to not
include it at this time.

I'll close this issue, but if you know of a maintained fork, feel free
to re-open it!
diff mbox series

Patch

From d7daf5771d02378606437c3b725e1229d405eeaa Mon Sep 17 00:00:00 2001
From: Luis Felipe <luis.felipe.la@protonmail.com>
Date: Tue, 23 Nov 2021 13:30:04 -0500
Subject: [PATCH] gnu: Add python-sodapy.

* gnu/packages/python-web.scm (python-sodapy): New variable.
---
 gnu/packages/python-web.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 4ddf89c207..d82edfa525 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -46,6 +46,7 @@ 
 ;;; Copyright © 2021 Pradana Aumars <paumars@courrier.dev>
 ;;; Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2021 jgart <jgart@dismail.de>
+;;; Copyright © 2021 Luis Felipe López Acevedo <luis.felipe.la@protonmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -6348,3 +6349,38 @@  (define-public python-flask-combo-jsonapi
 Flask-RESTful to quickly build APIs that fit the complexity of existing
 real-life projects with legacy data and diverse storage providers.")
     (license license:expat)))
+
+(define-public python-sodapy
+  (package
+    (name "python-sodapy")
+    (version "2.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/xmunoz/sodapy")
+             (commit (string-append version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "011gmxrnzipa9s6h2m9n9z60l2xb4bnsc983ixylffw8482j3qcx"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             ;; Add current working directory to PYTHONPATH so that
+             ;; the tests can find the sodapy package.
+             (setenv "PYTHONPATH"
+                     (string-append (getcwd) ":"
+                                    (getenv "PYTHONPATH")))
+             (when tests?
+               (invoke "pytest" "-vv")))))))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)
+       ("python-requests-mock" ,python-requests-mock)))
+    (propagated-inputs `(("python-requests" ,python-requests)))
+    (home-page "https://github.com/xmunoz/sodapy")
+    (synopsis "Python library for the Socrata Open Data API")
+    (description "Python library for the Socrata Open Data API.")
+    (license license:expat)))
-- 
2.33.0