weblate: 5.8.3 -> 5.9.2 and fix (#369307)

This commit is contained in:
Sandro
2025-01-18 02:08:15 +01:00
committed by GitHub
8 changed files with 171 additions and 39 deletions
+5 -4
View File
@@ -26,12 +26,10 @@ let
in
python.pkgs.buildPythonApplication rec {
pname = "weblate";
version = "5.8.3";
version = "5.9.2";
pyproject = true;
disabled = python.pythonOlder "3.11";
outputs = [
"out"
"static"
@@ -41,7 +39,7 @@ python.pkgs.buildPythonApplication rec {
owner = "WeblateOrg";
repo = "weblate";
tag = "weblate-${version}";
hash = "sha256-Kmna23jhhFRJ0ExplYNPFEaIAJxmwHU2azivfKHHnjs=";
hash = "sha256-/fsNQvIIgcTPZHHIwr8sruEJpPJTmXbevoxy1GPmOOU=";
};
patches = [
@@ -75,6 +73,7 @@ python.pkgs.buildPythonApplication rec {
[
aeidon
ahocorasick-rs
altcha
(toPythonModule (borgbackup.override { python3 = python; }))
celery
certifi
@@ -103,6 +102,7 @@ python.pkgs.buildPythonApplication rec {
gitpython
hiredis
html2text
httpx
iniparse
jsonschema
lxml
@@ -131,6 +131,7 @@ python.pkgs.buildPythonApplication rec {
tesserocr
translate-toolkit
translation-finder
unidecode
user-agents
weblate-language-data
weblate-schemas
@@ -0,0 +1,33 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "altcha";
version = "0.1.7";
pyproject = true;
src = fetchFromGitHub {
owner = "altcha-org";
repo = "altcha-lib-py";
tag = "v${version}";
hash = "sha256-jQUzIriy7p43WfbJ2XtT/n3AQy+f2ByDl7zNBBAxZ4I=";
};
build-system = [ setuptools ];
pythonImportsCheck = [ "altcha" ];
nativeCheckInputs = [ pytestCheckHook ];
meta = {
description = "Lightweight Python library for creating and verifying ALTCHA challenges";
homepage = "https://github.com/altcha-org/altcha-lib-py";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ erictapen ];
};
}
@@ -0,0 +1,48 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
twisted,
wrapt,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "crochet";
version = "2.1.1";
pyproject = true;
src = fetchFromGitHub {
owner = "itamarst";
repo = "crochet";
tag = version;
hash = "sha256-grymhvCC9zDBKhNnQC0o07hdLPV5KMWb6HSz/ntSbq8=";
};
# fix for python>=3.12
postPatch = ''
substituteInPlace versioneer.py \
--replace-fail "SafeConfigParser()" "ConfigParser()" \
--replace-fail "parser.readfp" "parser.read_file"
'';
build-system = [ setuptools ];
dependencies = [
twisted
wrapt
];
pythonImportsCheck = [ "crochet" ];
nativeCheckInputs = [ pytestCheckHook ];
meta = {
description = "Library that makes it easier to use Twisted from regular blocking code";
homepage = "https://github.com/itamarst/crochet";
changelog = "https://github.com/itamarst/crochet/blob/${src.tag}/docs/news.rst";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ erictapen ];
};
}
@@ -0,0 +1,65 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
blinker,
click,
crochet,
jsonschema,
pika,
pyopenssl,
requests,
service-identity,
tomli,
twisted,
pytest-mock,
pytest-twisted,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "fedora-messaging";
version = "3.6.0";
pyproject = true;
src = fetchFromGitHub {
owner = "fedora-infra";
repo = "fedora-messaging";
tag = "v${version}";
hash = "sha256-t5jwEgKLSB8APie+TD3WpgPYcAAPzEQLA+jXGlWVuNU=";
};
build-system = [ poetry-core ];
dependencies = [
blinker
click
crochet
jsonschema
pika
pyopenssl
requests
service-identity
tomli
twisted
];
pythonImportsCheck = [ "fedora_messaging" ];
nativeCheckInputs = [
pytest-mock
pytest-twisted
pytestCheckHook
];
pytestFlagsArray = [ "tests/unit" ];
meta = {
description = "Library for sending AMQP messages with JSON schema in Fedora infrastructure";
homepage = "https://github.com/fedora-infra/fedora-messaging";
changelog = "https://github.com/fedora-infra/fedora-messaging/releases/tag/${src.tag}";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ erictapen ];
};
}
@@ -1,7 +1,7 @@
{
lib,
buildPythonPackage,
fetchPypi,
fetchFromGitHub,
setuptools,
charset-normalizer,
ruamel-yaml,
@@ -11,17 +11,17 @@
buildPythonPackage rec {
pname = "translation-finder";
version = "2.16";
version = "2.19";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-a1C+j4Zo0DJ9BWDn5Zsu4zAftcUixfPktAWdqiFJpiU=";
src = fetchFromGitHub {
owner = "WeblateOrg";
repo = "translation-finder";
tag = version;
hash = "sha256-Hc1KxmzlFqCLHSAgFF8cgxH0dTdUnBV/2T2ZkfzVvSw=";
};
patches = [ ./fix_tests.patch ];
build-system = [ setuptools ];
dependencies = [
@@ -1,25 +0,0 @@
diff --git a/translation_finder/test_api.py b/translation_finder/test_api.py
index c3b020c..9be070d 100644
--- a/translation_finder/test_api.py
+++ b/translation_finder/test_api.py
@@ -173,6 +173,7 @@ class APITest(DiscoveryTestCase):
"filemask": "json/gotext-*.json",
"template": "json/gotext-en.json",
},
+ {'filemask': 'linked/*.po', 'new_base': 'linked/messages.pot', 'file_format': 'po'},
],
)
diff --git a/translation_finder/test_discovery.py b/translation_finder/test_discovery.py
index 1a0ca40..14caa4f 100644
--- a/translation_finder/test_discovery.py
+++ b/translation_finder/test_discovery.py
@@ -945,6 +945,9 @@ class JSONDiscoveryTest(DiscoveryTestCase):
"file_format": "json-nested",
"template": "src/app/[locale]/_translations/en.json",
},
+ {'filemask': '*/app/[locale]/_translations/cs.json', 'file_format': 'json-nested'},
+ {'filemask': '*/app/[locale]/_translations/de.json', 'file_format': 'json-nested'},
+ {'filemask': '*/app/[locale]/_translations/en.json', 'file_format': 'json-nested'}
],
)
@@ -7,19 +7,20 @@
jsonschema,
rfc3987,
strict-rfc3339,
fedora-messaging,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "weblate-schemas";
version = "2024.1";
version = "2024.2";
pyproject = true;
src = fetchPypi {
pname = "weblate_schemas";
inherit version;
hash = "sha256-nYPLD3VDO1Z97HI79J6Yjj3bWp1xKB79FWPCW146iz4=";
hash = "sha256-Y7hWqfv1gZ2sT2fNbWLVDzwbVdB/1rT/oND9p/mkYAs=";
};
build-system = [ setuptools ];
@@ -31,7 +32,10 @@ buildPythonPackage rec {
strict-rfc3339
];
nativeCheckInputs = [ pytestCheckHook ];
nativeCheckInputs = [
fedora-messaging
pytestCheckHook
] ++ jsonschema.optional-dependencies.format;
pythonImportsCheck = [ "weblate_schemas" ];
+6
View File
@@ -564,6 +564,8 @@ self: super: with self; {
altair = callPackage ../development/python-modules/altair { };
altcha = callPackage ../development/python-modules/altcha { };
altgraph = callPackage ../development/python-modules/altgraph { };
amarna = callPackage ../development/python-modules/amarna { };
@@ -2728,6 +2730,8 @@ self: super: with self; {
credstash = callPackage ../development/python-modules/credstash { };
crochet = callPackage ../development/python-modules/crochet { };
crocoddyl = toPythonModule (pkgs.crocoddyl.override {
pythonSupport = true;
python3Packages = self;
@@ -4529,6 +4533,8 @@ self: super: with self; {
feather-format = callPackage ../development/python-modules/feather-format { };
fedora-messaging = callPackage ../development/python-modules/fedora-messaging { };
feedfinder2 = callPackage ../development/python-modules/feedfinder2 { };
feedgen = callPackage ../development/python-modules/feedgen { };