From 8c058f0f0515d8d90a17d863344676c88fe95184 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Thu, 23 Oct 2025 19:25:50 +0100 Subject: [PATCH] gnu: python-translate-toolkit: Update to 3.15.6. * gnu/packages/python-xyz.scm (python-translate-toolkit): Update to 3.15.6. [source]: Fix pypi-uri format. [build-system]: Switch to pyproject-build-system. [arguments] : Enable. : Skip some problematic tests. : Don't delete 'sanity check. [propagated-inputs]: Remove python-babel, python-beautifulsoup4, python-chardet, python-diff-match-patch, python-levenshtein, python-six, and python-pyyaml; add python-cwcwidth, python-cheroot, python-iniparse, python-mistletoe, python-phply, python-pyparsing, and python-ruamel.yaml. [native-inputs]: Remove python-sphinx; add python-setuptools and python-setuptools-scm. Change-Id: I6c9c27d96fc8c1f24accd892fa85eb248e12eef8 --- gnu/packages/python-xyz.scm | 81 +++++++++++++++++++++++++------------ 1 file changed, 56 insertions(+), 25 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index f02c846142f6df3dd86414a9f770afec5d8b4b6c..4435f85e543e3af0f1748fab86a544c162de9a83 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -25073,42 +25073,73 @@ while only declaring the test-specific fields.") (define-public python-translate-toolkit (package (name "python-translate-toolkit") - (version "3.6.2") + (version "3.15.6") (source (origin (method url-fetch) - (uri (pypi-uri "translate-toolkit" version ".tar.gz")) + (uri (pypi-uri "translate_toolkit" version)) (sha256 - (base32 "0m4cpsp7x7h5m5agg4ybscf7y86wla46q2lvxpi2myplb6qlgcli")))) - (build-system python-build-system) + (base32 "0p23c5nvfw19wg2h4rqxf301z0023yl7ivpjyhr5byxf0sxnqnpq")))) + (build-system pyproject-build-system) + (arguments + (list + ;; tests: 2828 passed, 3 skipped, 28 deselected, 32 xfailed, 11 warnings + #:test-flags + ;; TODO: Some of the optional inputs are not packaged yet. + #~(list #$@(map (lambda (file) (string-append "--ignore=" + "tests/translate/" + file)) + (list "convert/test_ini2po.py" + "convert/test_php2po.py" + "convert/test_po2ini.py" + "convert/test_po2php.py" + "storage/test_cpo.py" + "storage/test_fluent.py" + "storage/test_ini.py" + "storage/test_php.py" + "storage/test_po.py" + "storage/test_pypo.py" + "storage/test_subtitles.py")) + #$@(map (lambda (test) (string-append "--deselect=" + "tests/translate/storage/" + test)) + ;; UnicodeDecodeError: 'utf-8' codec can't decode byte + ;; 0xff in position 0: invalid start byte + (list "test_csvl10n.py::TestCSV::test_encoding_save" + ;; FileNotFoundError: [Errno 2] No such file or + ;; directory: 'msgfmt' + "test_mo.py::TestMOFile::test_output" + ;; assert 0 == -16200 + "test_poheader.py::test_timezones")) + #$@(map (lambda (test) (string-append "--deselect=" + "tests/translate/tools/" + test)) + ;; XXX: Some issues with XML parsing. + (list "test_junitmsgfmt.py::test_output" + "test_pocount.py::test_output" + "test_pocount.py::test_cases")) + "-k" "not test_open_office_to_xliff and not test_po_to_xliff"))) (native-inputs - (list python-pytest python-sphinx)) + (list python-pytest + python-setuptools + python-setuptools-scm)) (propagated-inputs - (list python-babel - python-beautifulsoup4 - python-chardet - python-diff-match-patch - python-levenshtein + (list python-cwcwidth + python-cheroot + ;; python-aeidon + ;; python-fluent + python-iniparse python-lxml - python-six - python-vobject - 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. - (list #:tests? #f - #:phases - #~(modify-phases %standard-phases - ;; translate-toolkit has many optional dependencies (see - ;; optional.txt), which the sanity check does not understand. - (delete 'sanity-check)))) + python-mistletoe + python-phply + python-pyparsing + python-ruamel.yaml + python-vobject)) (home-page "https://toolkit.translatehouse.org") (synopsis "Tools and API for translation and localization engineering") (description "Tools and API for translation and localization engineering. It contains - several utilities, as well as an API for building localization tools.") +several utilities, as well as an API for building localization tools.") (license license:gpl2+))) (define-public python-gtts