summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2019-04-01 22:39:43 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2019-04-19 20:27:21 -0400
commitd5a998fa4c9023115563b3a4b7bb24e95a6e9bdc (patch)
treee159c9ea44fb7dd12739f8bf33a8c806edce8237 /gnu/packages
parentb24fd2c268ee5c89c10b1195a791502c84d5d329 (diff)
downloadpatches-d5a998fa4c9023115563b3a4b7bb24e95a6e9bdc.tar
patches-d5a998fa4c9023115563b3a4b7bb24e95a6e9bdc.tar.gz
gnu: Add python-pygithub.
* gnu/packages/python-xyz.scm (python-pygithub): New variable.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/python-xyz.scm46
1 files changed, 46 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c1014a9a6e..36edd7e0e2 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")