gnu: Add python-online-judge-api-client.

* gnu/packages/python-xyz.scm (python-online-judge-api-client): New variable.
* gnu/packages/patches/python-online-judge-api-client-tests.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add patch file.

Signed-off-by: Christopher Baines <mail@cbaines.net>
Change-Id: If407a070a52e66c723d042217a5ff6e1589efce1
This commit is contained in:
gemmaro 2023-08-26 15:22:40 +09:00 committed by Christopher Baines
parent db5c83e83b
commit 9524ff9f3a
No known key found for this signature in database
GPG key ID: 5E28A33B0B84F577
3 changed files with 493 additions and 0 deletions

View file

@ -139,6 +139,7 @@
;;; Copyright © 2023 Dominik Delgado Steuter <d@delgado.nrw>
;;; Copyright © 2023 Ivan Vilata-i-Balaguer <ivan@selidor.net>
;;; Copyright © 2023 Ontje Lünsdorf <ontje.luensdorf@dlr.de>
;;; Copyright © 2023 gemmaro <gemmaro.dev@gmail.com>
;;; Copyright © 2023 Parnikkapore <poomklao@yahoo.com>
;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
;;; Copyright © c4droid <c4droid@foxmail.com>
@ -24568,6 +24569,67 @@ in Python. You can simply type pybtex instead of bibtex.")
time-based (TOTP) passwords.")
(license license:expat)))
(define-public python-online-judge-api-client
(package
(name "python-online-judge-api-client")
(version "10.10.1")
;; Source distributions are not uploaded to PyPI.
;; https://pypi.org/project/online-judge-api-client/10.10.1/#files
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/online-judge-tools/api-client")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"0yjqhh44va5nawd9rpqcjyf0g7rjlkvn7s90fmwmwjyqvy6lhjiz"))
(patches (search-patches
"python-online-judge-api-client-tests.patch"))))
(build-system python-build-system)
(arguments
(list #:phases #~(modify-phases %standard-phases
;; These tests require network connections
(add-after 'unpack 'remove-failing-test
(lambda _
(for-each delete-file
'("tests/get_contest_atcoder.py"
"tests/get_contest_atcoder_problems.py"
"tests/get_contest_codechef.py"
"tests/get_contest_codeforces.py"
"tests/get_contest_yukicoder.py"
"tests/get_problem_anarchygolf.py"
"tests/get_problem_aoj.py"
"tests/get_problem_atcoder.py"
"tests/get_problem_codechef.py"
"tests/get_problem_codeforces.py"
"tests/get_problem_csacademy.py"
"tests/get_problem_facebook.py"
"tests/get_problem_hackerrank.py"
"tests/get_problem_kattis.py"
"tests/get_problem_library_checker.py"
"tests/get_problem_poj.py"
"tests/get_problem_topcoder.py"
"tests/get_problem_toph.py"
"tests/get_problem_yukicoder.py"
"tests/login_service.py")) #t)))))
(propagated-inputs (list python-appdirs
python-beautifulsoup4
python-colorlog
python-lxml
python-requests
python-toml
python-jsonschema))
(home-page "https://github.com/online-judge-tools/api-client")
(synopsis "API client for various online judges")
(description
"This is an API client for various online judges, used as the backend
library of @code{oj} command. You can use the Python
library (@code{onlinejudge} module) and the command-line
interface (@command{oj-api} command) which talks JSON compatible with
jmerle/competitive-companion.")
(license license:expat)))
(define-public python-parso
(package
(name "python-parso")