guix-commits
[Top][All Lists]
Advanced

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

04/09: gnu: Add python-pygithub.


From: guix-commits
Subject: 04/09: gnu: Add python-pygithub.
Date: Fri, 19 Apr 2019 20:55:19 -0400 (EDT)

apteryx pushed a commit to branch staging
in repository guix.

commit d5a998fa4c9023115563b3a4b7bb24e95a6e9bdc
Author: Maxim Cournoyer <address@hidden>
Date:   Mon Apr 1 22:39:43 2019 -0400

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

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c1014a9..36edd7e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -2683,6 +2683,52 @@ software version simply.")
 to deprecate classes, functions or methods.")
     (license license:expat)))
 
+(define-public python-pygithub
+  (package
+    (name "python-pygithub")
+    (version "1.43.7")
+    (source
+     ;; We fetch from the Git repo because there are no tests in the PyPI
+     ;; archive.
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/PyGithub/PyGithub.git";)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  ;; Some tests rely on the network.
+                  (add-after 'unpack 'disable-failing-tests
+                    (lambda _
+                      (substitute* "tests/Issue142.py"
+                        (("testDecodeJson") "disabled_testDecodeJson"))
+                      #t))
+                  (add-before 'check 'prepare-for-tests
+                    (lambda _
+                      (for-each (lambda (f)
+                                  (chmod f #o666))
+                                (find-files "./tests"))
+                      (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
+                      (setenv "PYTHONPATH"
+                              (string-append "./tests:" (getenv "PYTHONPATH")))
+                      #t)))))
+    (propagated-inputs
+     `(("python-deprecated" ,python-deprecated)
+       ("python-pyjwt" ,python-pyjwt)
+       ("python-requests" ,python-requests)))
+    (native-inputs `(("python-httpretty" ,python-httpretty)))
+    (home-page "https://pygithub.readthedocs.io/en/latest/";)
+    (synopsis "Python library for the GitHub API")
+    (description "This library allows managing GitHub resources such as
+repositories, user profiles, and organizations in your Python applications,
+using version 3 of the GitHub application programming interface (API).")
+    (license license:lgpl3+)))
+
 (define-public python-scp
   (package
     (name "python-scp")



reply via email to

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