[PATCH 0/7] Update python-translate-toolkit.

  • Done
  • quality assurance status badge
Details
One participant
  • Vinicius Monego
Owner
unassigned
Submitted by
Vinicius Monego
Severity
normal
V
V
Vinicius Monego wrote on 12 Aug 2021 03:29
(address . guix-patches@gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20210812012912.44638-1-monego@posteo.net
Vinicius Monego (7):
gnu: Add python-phply.
gnu: Add python-iniparse.
gnu: Remove virtaal.
gnu: python-translate-toolkit: Update to 3.3.6.
gnu: Remove python2-translate-toolkit.
gnu: python-translate-toolkit: Enable tests.
gnu: python-diff-match-patch: Update to 20200713.

gnu/packages/python-xyz.scm | 129 +++++++++++++++++++++++++++-------
gnu/packages/text-editors.scm | 39 ----------
2 files changed, 102 insertions(+), 66 deletions(-)

--
2.30.2
V
V
Vinicius Monego wrote on 12 Aug 2021 03:31
[PATCH 1/7] gnu: Add python-phply.
(address . 50021@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20210812013123.44869-1-monego@posteo.net
* gnu/packages/python-xyz.scm (python-phply): New variable.
---
gnu/packages/python-xyz.scm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Toggle diff (35 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ea4b8482ec..6cdfc94fc2 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -17707,6 +17707,28 @@ current test, while only declaring the test-specific fields")
(define-public python2-factory-boy
(package-with-python2 python-factory-boy))
+(define-public python-phply
+ (package
+ (name "python-phply")
+ (version "1.2.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "phply" version))
+ (sha256
+ (base32 "0gwz4j0pp479bwg6iwk7kcdbr1s4x9fikqri0b4ddn7vi198fibx"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("python-nose" ,python-nose)))
+ (propagated-inputs
+ `(("python-ply" ,python-ply)))
+ (home-page "https://github.com/viraptor/phply")
+ (synopsis "Lexer and parser for PHP source implemented using PLY")
+ (description
+ "@code{phply} is a parser for the PHP programming language written using
+PLY, a Lex/YACC-style parser generator toolkit for Python.")
+ (license license:bsd-3)))
+
(define-public python-translate-toolkit
(package
(name "python-translate-toolkit")
--
2.30.2
V
V
Vinicius Monego wrote on 12 Aug 2021 03:31
[PATCH 2/7] gnu: Add python-iniparse.
(address . 50021@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20210812013123.44869-2-monego@posteo.net
* gnu/packages/python-xyz.scm (python-iniparse): New variable.
---
gnu/packages/python-xyz.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)

Toggle diff (45 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 6cdfc94fc2..22341eda37 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -17729,6 +17729,38 @@ current test, while only declaring the test-specific fields")
PLY, a Lex/YACC-style parser generator toolkit for Python.")
(license license:bsd-3)))
+(define-public python-iniparse
+ (package
+ (name "python-iniparse")
+ (version "0.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "iniparse" version))
+ (sha256
+ (base32 "0hm8784r25l5wrl274x65329l0b7pq3vfyq10jssrrr6slwm4blk"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:tests? #f)) ;; FIXME: Some tests are failing.
+ (propagated-inputs
+ `(("python-six" ,python-six)))
+ (home-page "https://github.com/candlepin/python-iniparse")
+ (synopsis "Accessing and Modifying INI files")
+ (description "@code{iniparse} is a INI parser for Python which is:
+
+@itemize
+@item Compatible with ConfigParser: Backward compatible implementations of
+ConfigParser, RawConfigParser, and SafeConfigParser are included that are
+API-compatible with the Python standard library.
+@item Preserves structure of INI files: Order of sections & options,
+indentation, comments, and blank lines are preserved as far as possible
+when data is updated.
+@item More convenient: Values can be accessed using dotted notation
+(@code{cfg.user.name}), or using container syntax
+(@code{cfg['user']['name']).}
+@end itemize")
+ (license license:expat)))
+
(define-public python-translate-toolkit
(package
(name "python-translate-toolkit")
--
2.30.2
V
V
Vinicius Monego wrote on 12 Aug 2021 03:31
[PATCH 3/7] gnu: Remove virtaal.
(address . 50021@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20210812013123.44869-3-monego@posteo.net
This package depends on Python 2 which is past end-of-life and not supported
by newer versions of some of the dependencies.

* gnu/packages/text-editors.scm (virtaal): Remove variable.
---
gnu/packages/text-editors.scm | 39 -----------------------------------
1 file changed, 39 deletions(-)

Toggle diff (49 lines)
diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index 2074442da5..bb63ae56f7 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -1153,42 +1153,3 @@ files. It was originally developed on the Amiga 3000T.")
systems that displays its buffer(s) as a hex dump. The user interface is kept
similar to vi/ex.")
(license license:bsd-3)))
-
-(define-public virtaal
- (package
- (name "virtaal")
- (version "0.7.1")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://sourceforge/translate/Virtaal/"
- version "/virtaal-" version ".tar.bz2"))
- (sha256
- (base32
- "0cyimjp3191qlmw6n0ipqdr9xr0cq4f6dqvz4rl9q31h6l3kywf9"))))
- (build-system python-build-system)
- (arguments
- `(#:python ,python-2
- #:use-setuptools? #f
- #:tests? #f ;; Failing tests
- #:phases
- (modify-phases %standard-phases
- (add-before 'build 'configure
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Set data file path to absolute store path.
- (substitute* "virtaal/common/pan_app.py"
- (("file_discovery\\.get_abs_data_filename.*")
- (string-append "os.path.join('"
- (assoc-ref outputs "out")
- "/share', *path_parts)"))))))))
- (inputs
- `(("python2-lxml" ,python2-lxml)
- ("python2-pygtk" ,python2-pygtk)
- ("python2-simplejson" ,python2-simplejson)
- ("python2-translate-toolkit" ,python2-translate-toolkit)
- ("python2-pycurl" ,python2-pycurl)))
- (synopsis "Graphical translation tool")
- (description "Virtaal is a powerful yet simple translation tool with an
-uncluttered user interface. It supports a multitude of translation formats
-provided by the Translate Toolkit, including XLIFF and PO.")
- (home-page "https://virtaal.translatehouse.org/")
- (license license:gpl2+)))
--
2.30.2
V
V
Vinicius Monego wrote on 12 Aug 2021 03:31
[PATCH 4/7] gnu: python-translate-toolkit: Update to 3.3.6.
(address . 50021@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20210812013123.44869-4-monego@posteo.net
* gnu/packages/python-xyz.scm (python-translate-toolkit): Update to 3.3.6.
[propagated-inputs]: Remove python-babel, python-beautifulsoup4,
python-chardet, python-diff-match-patch, python-levenshtein, python-lxml,
python-six, python-vobject, python-pyyaml.
---
gnu/packages/python-xyz.scm | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)

Toggle diff (44 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 22341eda37..a92f4ebc67 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -17764,33 +17764,25 @@ when data is updated.
(define-public python-translate-toolkit
(package
(name "python-translate-toolkit")
- (version "2.1.0")
+ (version "3.3.6")
(source
(origin
(method url-fetch)
- (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
+ (uri (pypi-uri "translate-toolkit" version ".tar.gz"))
(sha256
- (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
+ (base32 "0q0qvs4sk1yhbsl9ja8ivvw0083bvfylbhnbbnx17833qmd83imb"))))
(build-system python-build-system)
(native-inputs
`(("python-pytest" ,python-pytest)
("python-sphinx" ,python-sphinx)))
(propagated-inputs
- `(("python-babel" ,python-babel)
- ("python-beautifulsoup4" ,python-beautifulsoup4)
- ("python-chardet" ,python-chardet)
- ("python-diff-match-patch" ,python-diff-match-patch)
- ("python-levenshtein" ,python-levenshtein)
- ("python-lxml" ,python-lxml)
- ("python-six" ,python-six)
- ("python-vobject" ,python-vobject)
- ("python-pyyaml" ,python-pyyaml)))
(arguments
;; TODO: tests are not run, because they end with
;; TypeError: parse() missing 2 required positional arguments: 'tree' and
;; 'parse_funcs'
;; during test setup.
`(#:tests? #f))
+ `(("python-lxml" ,python-lxml)))
(home-page "https://toolkit.translatehouse.org")
(synopsis "Tools and API for translation and localization engineering")
(description
--
2.30.2
V
V
Vinicius Monego wrote on 12 Aug 2021 03:31
[PATCH 6/7] gnu: python-translate-toolkit: Enable tests.
(address . 50021@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20210812013123.44869-6-monego@posteo.net
* gnu/packages/python-xyz.scm (python-translate-toolkit)[arguments]: Remove
\#:tests?.
[native-inputs]: Remove python-sphinx. Add python-iniparse, python-phply,
python-ruamel.yaml, python-vobject.
---
gnu/packages/python-xyz.scm | 41 +++++++++++++++++++++++++++++--------
1 file changed, 32 insertions(+), 9 deletions(-)

Toggle diff (55 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index fbacc02c14..0e17657ce9 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -17772,16 +17772,39 @@ when data is updated.
(sha256
(base32 "0q0qvs4sk1yhbsl9ja8ivvw0083bvfylbhnbbnx17833qmd83imb"))))
(build-system python-build-system)
- (native-inputs
- `(("python-pytest" ,python-pytest)
- ("python-sphinx" ,python-sphinx)))
- (propagated-inputs
(arguments
- ;; TODO: tests are not run, because they end with
- ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
- ;; 'parse_funcs'
- ;; during test setup.
- `(#:tests? #f))
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'pre-check
+ (lambda _
+ ;; TODO: Requires python-cheroot.
+ (delete-file "translate/services/test_tmserver.py")
+ ;; Requires gaupol which brings in video dependencies.
+ (delete-file "translate/storage/test_subtitles.py")))
+ (replace 'check
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "python" "-m" "pytest" "-k"
+ (string-append
+ ;; XMLSchemaParseError.
+ "not test_open_office_to_xliff"
+ " and not test_po_to_xliff"
+ ;; AssertionError.
+ " and not test_language_iso_fullname"
+ " and not test_country_iso_name"
+ " and not test_language_iso_name"
+ " and not test_timezones"
+ ;; FIXME: Requires msgfmt from gettext, but
+ ;; libgettextpo.so is not found by setup.py.
+ " and not test_output"))))))))
+ (native-inputs
+ `(("python-iniparse" ,python-iniparse)
+ ("python-phply" ,python-phply)
+ ("python-pytest" ,python-pytest)
+ ("python-ruamel.yaml" ,python-ruamel.yaml)
+ ("python-vobject" ,python-vobject)))
+ (propagated-inputs
`(("python-lxml" ,python-lxml)))
(home-page "https://toolkit.translatehouse.org")
(synopsis "Tools and API for translation and localization engineering")
--
2.30.2
V
V
Vinicius Monego wrote on 12 Aug 2021 03:31
[PATCH 7/7] gnu: python-diff-match-patch: Update to 20200713.
(address . 50021@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20210812013123.44869-7-monego@posteo.net
* gnu/packages/python-xyz.scm (python-diff-match-patch): Update to 20200713.
[arguments]<#:phases>: Override 'check phase.
[home-page]: Change to GitHub URL.
---
Tests were running before. Only the method had to be changed.

gnu/packages/python-xyz.scm | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)

Toggle diff (35 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 0e17657ce9..4142da19a0 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -17553,16 +17553,25 @@ make common patterns shorter and easier.")
(define-public python-diff-match-patch
(package
(name "python-diff-match-patch")
- (version "20121119")
+ (version "20200713")
(source
(origin
(method url-fetch)
(uri (pypi-uri "diff-match-patch" version))
(sha256
(base32
- "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
+ "063s8zcxz787xfg7d1wxpqh59fxg3iz85ww9zhyz4vaqm80mlvys"))))
(build-system python-build-system)
- (home-page "https://code.google.com/p/google-diff-match-patch")
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "python" "-m" "unittest"
+ "diff_match_patch.tests")))))))
+ (home-page "https://github.com/diff-match-patch-python/diff-match-patch")
(synopsis "Synchronize plain text")
(description "Diff Match and Patch libraries offer robust algorithms to
perform the operations required for synchronizing plain text.")
--
2.30.2
V
V
Vinicius Monego wrote on 12 Aug 2021 03:31
[PATCH 5/7] gnu: Remove python2-translate-toolkit.
(address . 50021@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20210812013123.44869-5-monego@posteo.net
* gnu/packages/python-xyz.scm (python2-translate-toolkit): Remove variable.
---
gnu/packages/python-xyz.scm | 3 ---
1 file changed, 3 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index a92f4ebc67..fbacc02c14 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -17790,9 +17790,6 @@ when data is updated.
several utilities, as well as an API for building localization tools.")
(license license:gpl2+)))
-(define-public python2-translate-toolkit
- (package-with-python2 python-translate-toolkit))
-
(define-public python-packaging
(package
(name "python-packaging")
--
2.30.2
V
V
Vinicius Monego wrote on 26 Oct 2021 01:16
[PATCH v2 1/8] gnu: Add python-phply.
(address . 50021@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20211025231615.73660-1-monego@posteo.net
* gnu/packages/python-xyz.scm (python-phply): New variable.
---
gnu/packages/python-xyz.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index eb9fcc310d..84ead833eb 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -18469,6 +18469,27 @@ current test, while only declaring the test-specific fields")
(define-public python2-factory-boy
(package-with-python2 python-factory-boy))
+(define-public python-phply
+ (package
+ (name "python-phply")
+ (version "1.2.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "phply" version))
+ (sha256
+ (base32 "0gwz4j0pp479bwg6iwk7kcdbr1s4x9fikqri0b4ddn7vi198fibx"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("python-nose" ,python-nose)))
+ (propagated-inputs
+ `(("python-ply" ,python-ply)))
+ (home-page "https://github.com/viraptor/phply")
+ (synopsis "Lexer and parser for PHP")
+ (description "@code{phply} is a parser for the PHP programming language
+written in PLY.")
+ (license license:bsd-3)))
+
(define-public python-translate-toolkit
(package
(name "python-translate-toolkit")

base-commit: e1261ddd38cf02a0f046f3a5360502d659b4e7d4
--
2.30.2
V
V
Vinicius Monego wrote on 26 Oct 2021 01:16
[PATCH v2 2/8] gnu: Add python-iniparse.
(address . 50021@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20211025231615.73660-2-monego@posteo.net
* gnu/packages/python-xyz.scm (python-iniparse): New variable.
---
gnu/packages/python-xyz.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)

Toggle diff (45 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 84ead833eb..e025f7b87b 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -18490,6 +18490,38 @@ current test, while only declaring the test-specific fields")
written in PLY.")
(license license:bsd-3)))
+(define-public python-iniparse
+ (package
+ (name "python-iniparse")
+ (version "0.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "iniparse" version))
+ (sha256
+ (base32 "0hm8784r25l5wrl274x65329l0b7pq3vfyq10jssrrr6slwm4blk"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:tests? #f)) ;; FIXME: Some tests are failing.
+ (propagated-inputs
+ `(("python-six" ,python-six)))
+ (home-page "https://github.com/candlepin/python-iniparse")
+ (synopsis "Accessing and Modifying INI files")
+ (description "@code{iniparse} is a INI parser for Python which is:
+
+@itemize
+@item Compatible with ConfigParser: Backward compatible implementations of
+ConfigParser, RawConfigParser, and SafeConfigParser are included that are
+API-compatible with the Python standard library.
+@item Preserves structure of INI files: Order of sections & options,
+indentation, comments, and blank lines are preserved as far as possible
+when data is updated.
+@item More convenient: Values can be accessed using dotted notation
+(@code{cfg.user.name}), or using container syntax
+(@code{cfg['user']['name']).}
+@end itemize")
+ (license license:expat)))
+
(define-public python-translate-toolkit
(package
(name "python-translate-toolkit")
--
2.30.2
V
V
Vinicius Monego wrote on 26 Oct 2021 01:16
[PATCH v2 3/8] gnu: Remove virtaal.
(address . 50021@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20211025231615.73660-3-monego@posteo.net
This package depends on Python 2 which is past end-of-life and not supported
by newer versions of some of the dependencies.

* gnu/packages/text-editors.scm (virtaal): Remove variable.
---
gnu/packages/text-editors.scm | 39 -----------------------------------
1 file changed, 39 deletions(-)

Toggle diff (49 lines)
diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index d73f32c64e..4c428616b8 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -1156,42 +1156,3 @@ files. It was originally developed on the Amiga 3000T.")
systems that displays its buffer(s) as a hex dump. The user interface is kept
similar to vi/ex.")
(license license:bsd-3)))
-
-(define-public virtaal
- (package
- (name "virtaal")
- (version "0.7.1")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://sourceforge/translate/Virtaal/"
- version "/virtaal-" version ".tar.bz2"))
- (sha256
- (base32
- "0cyimjp3191qlmw6n0ipqdr9xr0cq4f6dqvz4rl9q31h6l3kywf9"))))
- (build-system python-build-system)
- (arguments
- `(#:python ,python-2
- #:use-setuptools? #f
- #:tests? #f ;; Failing tests
- #:phases
- (modify-phases %standard-phases
- (add-before 'build 'configure
- (lambda* (#:key outputs #:allow-other-keys)
- ;; Set data file path to absolute store path.
- (substitute* "virtaal/common/pan_app.py"
- (("file_discovery\\.get_abs_data_filename.*")
- (string-append "os.path.join('"
- (assoc-ref outputs "out")
- "/share', *path_parts)"))))))))
- (inputs
- `(("python2-lxml" ,python2-lxml)
- ("python2-pygtk" ,python2-pygtk)
- ("python2-simplejson" ,python2-simplejson)
- ("python2-translate-toolkit" ,python2-translate-toolkit)
- ("python2-pycurl" ,python2-pycurl)))
- (synopsis "Graphical translation tool")
- (description "Virtaal is a powerful yet simple translation tool with an
-uncluttered user interface. It supports a multitude of translation formats
-provided by the Translate Toolkit, including XLIFF and PO.")
- (home-page "https://virtaal.translatehouse.org/")
- (license license:gpl2+)))
--
2.30.2
V
V
Vinicius Monego wrote on 26 Oct 2021 01:16
[PATCH v2 4/8] gnu: Remove python2-translate-toolkit.
(address . 50021@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20211025231615.73660-4-monego@posteo.net
* gnu/packages/python-xyz.scm (python2-translate-toolkit): Remove variable.
---
gnu/packages/python-xyz.scm | 3 ---
1 file changed, 3 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e025f7b87b..1501fdac39 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -18559,9 +18559,6 @@ when data is updated.
several utilities, as well as an API for building localization tools.")
(license license:gpl2+)))
-(define-public python2-translate-toolkit
- (package-with-python2 python-translate-toolkit))
-
(define-public python-packaging
(package
(name "python-packaging")
--
2.30.2
V
V
Vinicius Monego wrote on 26 Oct 2021 01:16
[PATCH v2 5/8] gnu: Add python-fluent-syntax.
(address . 50021@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20211025231615.73660-5-monego@posteo.net
* gnu/packages/python-xyz.scm (python-fluent-syntax): New variable.
---
gnu/packages/python-xyz.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (46 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 1501fdac39..068278c2f8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13530,6 +13530,39 @@ interface to the Amazon Web Services (AWS) API.")
@acronym{AWS,Amazon Web Services}.")
(license license:asl2.0)))
+(define-public python-fluent-syntax
+ (package
+ (name "python-fluent-syntax")
+ (version "0.18.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference ; no tests in PyPI release
+ (url "https://github.com/projectfluent/python-fluent")
+ (commit (string-append "fluent.syntax@" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "06a88fyhqvmhpp1wf7ghcmpzg92s8wgpb1bbi4y09ixva5r9dgwg"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'goto-syntax-dir
+ (lambda _
+ (chdir "fluent.syntax")))
+ (replace 'check
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "python" "runtests.py")))))))
+ (propagated-inputs
+ `(("python-six" ,python-six)))
+ (home-page "https://github.com/projectfluent/python-fluent")
+ (synopsis "Localization library for expressive translations")
+ (description "This package includes the parser, serializer, and traversal
+utilities like Visitor and Transformer for Fluent files.")
+ (license license:asl2.0)))
+
(define-public python-pyfiglet
(package
(name "python-pyfiglet")
--
2.30.2
V
V
Vinicius Monego wrote on 26 Oct 2021 01:16
[PATCH v2 6/8] gnu: python-translate-toolkit: Update to 3.4.1.
(address . 50021@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20211025231615.73660-6-monego@posteo.net
* gnu/packages/python-xyz.scm (python-translate-toolkit): Update to 3.4.1.
[source]: Update PyPI URI.
[propagated-inputs]: Remove python-babel, python-beautifulsoup4,
python-chardet, python-diff-match-patch, python-levenshtein, python-lxml,
python-six, python-vobject, python-pyyaml.
---
gnu/packages/python-xyz.scm | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)

Toggle diff (44 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 068278c2f8..93d0deb3f4 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -18558,33 +18558,25 @@ when data is updated.
(define-public python-translate-toolkit
(package
(name "python-translate-toolkit")
- (version "2.1.0")
+ (version "3.4.1")
(source
(origin
(method url-fetch)
- (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
+ (uri (pypi-uri "translate-toolkit" version ".tar.gz"))
(sha256
- (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
+ (base32 "1l6gk3frjjbd6s0cyvk8qkmgpr4zf0jyxr9f5b73xqqk8mwp5p1f"))))
(build-system python-build-system)
(native-inputs
`(("python-pytest" ,python-pytest)
("python-sphinx" ,python-sphinx)))
(propagated-inputs
- `(("python-babel" ,python-babel)
- ("python-beautifulsoup4" ,python-beautifulsoup4)
- ("python-chardet" ,python-chardet)
- ("python-diff-match-patch" ,python-diff-match-patch)
- ("python-levenshtein" ,python-levenshtein)
- ("python-lxml" ,python-lxml)
- ("python-six" ,python-six)
- ("python-vobject" ,python-vobject)
- ("python-pyyaml" ,python-pyyaml)))
(arguments
;; TODO: tests are not run, because they end with
;; TypeError: parse() missing 2 required positional arguments: 'tree' and
;; 'parse_funcs'
;; during test setup.
`(#:tests? #f))
+ `(("python-lxml" ,python-lxml)))
(home-page "https://toolkit.translatehouse.org")
(synopsis "Tools and API for translation and localization engineering")
(description
--
2.30.2
V
V
Vinicius Monego wrote on 26 Oct 2021 01:16
[PATCH v2 7/8] gnu: python-translate-toolkit: Enable tests.
(address . 50021@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20211025231615.73660-7-monego@posteo.net
* gnu/packages/python-xyz.scm (python-translate-toolkit)[arguments]: Remove
#:tests?.
<#:phases>: Add custom phase before 'check to delete some test files. Override
'check phase.
[native-inputs]: Remove python-sphinx. Add python-fluent-syntax,
python-iniparse, python-phply, python-ruamel.yaml, python-vobject.
---
gnu/packages/python-xyz.scm | 42 +++++++++++++++++++++++++++++--------
1 file changed, 33 insertions(+), 9 deletions(-)

Toggle diff (56 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 93d0deb3f4..778e68f4f3 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -18566,16 +18566,40 @@ when data is updated.
(sha256
(base32 "1l6gk3frjjbd6s0cyvk8qkmgpr4zf0jyxr9f5b73xqqk8mwp5p1f"))))
(build-system python-build-system)
- (native-inputs
- `(("python-pytest" ,python-pytest)
- ("python-sphinx" ,python-sphinx)))
- (propagated-inputs
(arguments
- ;; TODO: tests are not run, because they end with
- ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
- ;; 'parse_funcs'
- ;; during test setup.
- `(#:tests? #f))
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'pre-check
+ (lambda _
+ ;; TODO: Requires python-cheroot.
+ (delete-file "translate/services/test_tmserver.py")
+ ;; Requires gaupol which brings in video dependencies.
+ (delete-file "translate/storage/test_subtitles.py")))
+ (replace 'check
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "python" "-m" "pytest" "-k"
+ (string-append
+ ;; XMLSchemaParseError.
+ "not test_open_office_to_xliff"
+ " and not test_po_to_xliff"
+ ;; AssertionError.
+ " and not test_language_iso_fullname"
+ " and not test_country_iso_name"
+ " and not test_language_iso_name"
+ " and not test_timezones"
+ ;; FIXME: Requires msgfmt from gettext, but
+ ;; libgettextpo.so is not found by setup.py.
+ " and not test_output"))))))))
+ (native-inputs
+ `(("python-fluent-syntax" ,python-fluent-syntax)
+ ("python-iniparse" ,python-iniparse)
+ ("python-phply" ,python-phply)
+ ("python-pytest" ,python-pytest)
+ ("python-ruamel.yaml" ,python-ruamel.yaml)
+ ("python-vobject" ,python-vobject)))
+ (propagated-inputs
`(("python-lxml" ,python-lxml)))
(home-page "https://toolkit.translatehouse.org")
(synopsis "Tools and API for translation and localization engineering")
--
2.30.2
V
V
Vinicius Monego wrote on 26 Oct 2021 16:48
[PATCH v2 8/8] gnu: python-diff-match-patch: Update to 20200713.
(address . 50021@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20211026144855.105293-1-monego@posteo.net
* gnu/packages/python-xyz.scm (python-diff-match-patch): Update to 20200713.
[arguments]<#:phases>: Override 'check phase.
[home-page]: Change to GitHub URL.
---
gnu/packages/python-xyz.scm | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)

Toggle diff (35 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 778e68f4f3..5d07003a5b 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -18348,16 +18348,25 @@ make common patterns shorter and easier.")
(define-public python-diff-match-patch
(package
(name "python-diff-match-patch")
- (version "20121119")
+ (version "20200713")
(source
(origin
(method url-fetch)
(uri (pypi-uri "diff-match-patch" version))
(sha256
(base32
- "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
+ "063s8zcxz787xfg7d1wxpqh59fxg3iz85ww9zhyz4vaqm80mlvys"))))
(build-system python-build-system)
- (home-page "https://code.google.com/p/google-diff-match-patch")
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "python" "-m" "unittest"
+ "diff_match_patch.tests")))))))
+ (home-page "https://github.com/diff-match-patch-python/diff-match-patch")
(synopsis "Synchronize plain text")
(description "Diff Match and Patch libraries offer robust algorithms to
perform the operations required for synchronizing plain text.")
--
2.30.2
V
V
Vinicius Monego wrote on 22 Aug 2022 00:24
[PATCH 0/7] Update python-translate-toolkit.
(address . 50021-done@debbugs.gnu.org)
29bdf940ddd56450892e091cd381386d99ba68f5.camel@posteo.net
This package was updated in 678c5bea3a27064ad000ec79cc1ad8b7e40a5241.
Closing.
Closed
?