summaryrefslogtreecommitdiff
path: root/gnu/packages/python-xyz.scm
diff options
context:
space:
mode:
authorgemmaro <gemmaro.dev@gmail.com>2023-08-26 15:22:41 +0900
committerChristopher Baines <mail@cbaines.net>2023-10-30 11:17:42 +0000
commit789ef6837f9794c02bc53a854aacfdf04d3384cf (patch)
tree38e875ba944aa1577148a8f98c42466df697886b /gnu/packages/python-xyz.scm
parent9524ff9f3ac63e02bc954d19273ed630eab0c754 (diff)
gnu: Add online-judge-tools.
* gnu/packages/python-xyz.scm (online-judge-tools): New variable. * gnu/packages/patches/online-judge-tools.patch: New file. * gnu/local.mk (dist_patch_DATA): Add patch file. Signed-off-by: Christopher Baines <mail@cbaines.net> Change-Id: I78315db15ca8205dff607e98388c404ede64fb60
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r--gnu/packages/python-xyz.scm35
1 files changed, 35 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index a64a86492c..c95defd999 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -24630,6 +24630,41 @@ interface (@command{oj-api} command) which talks JSON compatible with
jmerle/competitive-companion.")
(license license:expat)))
+(define-public online-judge-tools
+ (package
+ (name "online-judge-tools")
+ (version "11.5.1")
+ ;; Source distributions are not uploaded to PyPI.
+ ;; https://pypi.org/project/online-judge-tools/11.5.1/#files
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/online-judge-tools/oj")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0zkzmmjgjb6lyrzq1ip54cpnp7al9a7mcyjyi5vx58bvnx3q0c6m"))
+ (patches (search-patches "online-judge-tools.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 _
+ (delete-file "tests/command_version.py") #t)))))
+ (inputs (list time))
+ (propagated-inputs (list python-online-judge-api-client python-colorama
+ python-requests))
+ (home-page "https://github.com/online-judge-tools/oj")
+ (synopsis "Command to help solving problems on various online judges")
+ (description
+ "@command{oj} is a command line tool to help solving problems on
+various online judges. This command automates downloading sample
+cases, generating additional test cases, testing for your code, and
+submitting it.")
+ (license license:expat)))
+
(define-public python-parso
(package
(name "python-parso")