summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorRaghav Gururajan <rg@raghavgururajan.name>2021-03-01 16:01:21 -0500
committerEfraim Flashner <efraim@flashner.co.il>2021-03-11 20:48:05 +0200
commit340e6dd51b42f03e7370eeda417197a23f49402f (patch)
tree6b59d0c0091c7b85d5a95f119e98154e52455369 /gnu/packages
parent532fc2fbaf8f3b13eb1bfc1024a31e957a68cffd (diff)
downloadguix-340e6dd51b42f03e7370eeda417197a23f49402f.tar.gz
gnu: Add python-praw.
* gnu/packages/python-web.scm (python-raw): New variable.

Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/python-web.scm43
1 files changed, 43 insertions, 0 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 9415b8cee9..8cfddcdfac 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -116,6 +116,49 @@
     (home-page "https://praw.readthedocs.io/en/latest/")
     (license license:bsd-2)))
 
+(define-public python-praw
+  (package
+    (name "python-praw")
+    (version "7.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "praw" version))
+       (sha256
+        (base32 "0ll1a0n8xs8gykizdsfrw63jp6bc39ab0pk3yzwcak96fyxh0ij3"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'disable-failing-tests
+           (lambda _
+             (with-directory-excursion "tests"
+               ;; Require networking.
+               (for-each delete-file-recursively
+                         '("integration/models" "unit/models"))
+               ;; https://github.com/praw-dev/praw/issues/1699
+               ;; #issuecomment-795336704
+               (delete-file "unit/test_config.py"))
+             #t))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "pytest"))
+             #t)))))
+    (native-inputs
+     `(("python-betamax" ,python-betamax)
+       ("python-betamax-matchers" ,python-betamax-matchers)
+       ("python-pytest" ,python-pytest)))
+    (propagated-inputs
+     `(("python-prawcore" ,python-prawcore)
+       ("python-websocket-client" ,python-websocket-client)))
+    (synopsis "Python Reddit API Wrapper")
+    (description "PRAW is a Python package that allows for simple access to
+Reddit’s API.  It aims to be easy to use and internally follows all of Reddit’s
+API rules.")
+    (home-page "https://praw.readthedocs.io/en/latest/")
+    (license license:bsd-2)))
+
 (define-public python-aiohttp
   (package
     (name "python-aiohttp")