[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/20: gnu: Add python2-tegaki-python.
From: |
guix-commits |
Subject: |
04/20: gnu: Add python2-tegaki-python. |
Date: |
Tue, 17 Sep 2019 01:34:22 -0400 (EDT) |
alexvong1995 pushed a commit to branch master
in repository guix.
commit c2810523102dfe4fc8153c3b02fe881bf48c6699
Author: Alex Vong <address@hidden>
Date: Thu Aug 8 13:49:19 2019 +0800
gnu: Add python2-tegaki-python.
* gnu/packages/language.scm (python2-tegaki-python): New variable.
---
gnu/packages/language.scm | 54 +++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 52 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/language.scm b/gnu/packages/language.scm
index cc68543..2ef4fed 100644
--- a/gnu/packages/language.scm
+++ b/gnu/packages/language.scm
@@ -22,6 +22,7 @@
(define-module (gnu packages language)
#:use-module (gnu packages)
#:use-module (gnu packages glib)
+ #:use-module (gnu packages ocr)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
@@ -31,8 +32,10 @@
#:use-module (guix packages)
#:use-module (guix build-system perl)
#:use-module (guix build-system python)
- #:use-module ((guix licenses) #:select (gpl2 gpl2+ gpl3 perl-license))
- #:use-module (guix download))
+ #:use-module ((guix licenses)
+ #:select (bsd-3 gpl2 gpl2+ gpl3 perl-license zpl2.1))
+ #:use-module (guix download)
+ #:use-module (guix utils))
(define-public perl-lingua-en-findnumber
(package
@@ -479,3 +482,50 @@ modern implementation of handwriting recognition software,
specifically
designed for Chinese (simplified and traditional) and Japanese, and that is
suitable for both the desktop and mobile devices.")
(license gpl2+))) ; all files
+
+(define-public python2-tegaki-python
+ (package
+ (inherit python2-tegaki-wagomu)
+ (name "python2-tegaki-python")
+ (version "0.3.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (tegaki-release-uri "tegaki-python" version))
+ (sha256
+ (base32
+ "0x93k7pw9nh0ywd97pr8pm7jv3f94nw044i5k0zvzhdpsjqvak7p"))
+ (modules remove-pre-compiled-files-modules)
+ (snippet (remove-pre-compiled-files "pyc"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments python2-tegaki-wagomu)
+ ((#:phases _)
+ `(modify-phases %standard-phases
+ (add-after 'unpack 'pre-configure
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Always convert string to unicode to avoid the following error
+ ;; when running "tegaki-build" in python2-tegaki-tools:
+ ;;
+ ;; sqlite3.ProgrammingError: You must not use 8-bit bytestrings
+ ;; unless you use a text_factory that can interpret 8-bit
+ ;; bytestrings (like text_factory = str).
+ ;; It is highly recommended that you instead just switch your
+ ;; application to Unicode strings.
+ (substitute* "tegaki/charcol.py"
+ (("sqlite3.OptimizedUnicode")
+ "lambda s: unicode(s, 'utf-8')"))
+ (substitute* "tegaki/engine.py"
+ (("/usr(/local)?")
+ (assoc-ref inputs "python2-tegaki-wagomu")))
+ #t))))))
+ ;; override inherited inputs
+ (inputs '())
+ (native-inputs '())
+ (propagated-inputs
+ `(("python2-tegaki-wagomu" ,python2-tegaki-wagomu)
+ ("python2-zinnia" ,python2-zinnia)))
+ (synopsis
+ "Chinese and Japanese Handwriting Recognition (Base python library)")
+ (license (list gpl2+ ; all files except...
+ bsd-3 ; dictutils.py
+ zpl2.1)))) ; minjson.py
- 02/20: gnu: Add python2-zinnia., (continued)
- 02/20: gnu: Add python2-zinnia., guix-commits, 2019/09/17
- 01/20: gnu: Add zinnia., guix-commits, 2019/09/17
- 06/20: gnu: Add python2-tegaki-tools., guix-commits, 2019/09/17
- 08/20: gnu: Add tegaki-zinnia-japanese., guix-commits, 2019/09/17
- 14/20: gnu: Add tegaki-zinnia-traditional-chinese., guix-commits, 2019/09/17
- 18/20: gnu: Add tegaki-wagomu-japanese-joyo., guix-commits, 2019/09/17
- 12/20: gnu: Add tegaki-zinnia-simplified-chinese., guix-commits, 2019/09/17
- 16/20: gnu: Add tegaki-wagomu-japanese., guix-commits, 2019/09/17
- 15/20: gnu: Add tegaki-zinnia-traditional-chinese-light., guix-commits, 2019/09/17
- 05/20: gnu: Add python2-tegaki-pygtk., guix-commits, 2019/09/17
- 04/20: gnu: Add python2-tegaki-python.,
guix-commits <=
- 03/20: gnu: Add python2-tegaki-wagomu., guix-commits, 2019/09/17
- 09/20: gnu: Add tegaki-zinnia-japanese-light., guix-commits, 2019/09/17
- 10/20: gnu: Add tegaki-zinnia-japanese-kyoiku., guix-commits, 2019/09/17
- 07/20: gnu: Add python2-tegaki-recognize., guix-commits, 2019/09/17
- 11/20: gnu: Add tegaki-zinnia-japanese-joyo., guix-commits, 2019/09/17
- 17/20: gnu: Add tegaki-wagomu-japanese-kyoiku., guix-commits, 2019/09/17
- 19/20: gnu: Add tegaki-wagomu-simplified-chinese., guix-commits, 2019/09/17
- 20/20: gnu: Add tegaki-wagomu-traditional-chinese., guix-commits, 2019/09/17
- 13/20: gnu: Add tegaki-zinnia-simplified-chinese-light., guix-commits, 2019/09/17