Skip to content

Commit

Permalink
weblate: 5.8.3 -> 5.9.2 and fix (#369307)
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 authored Jan 18, 2025
2 parents 8336f8b + 361ddcd commit e969a11
Show file tree
Hide file tree
Showing 8 changed files with 171 additions and 39 deletions.
9 changes: 5 additions & 4 deletions pkgs/by-name/we/weblate/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -41,7 +39,7 @@ python.pkgs.buildPythonApplication rec {
owner = "WeblateOrg";
repo = "weblate";
tag = "weblate-${version}";
hash = "sha256-Kmna23jhhFRJ0ExplYNPFEaIAJxmwHU2azivfKHHnjs=";
hash = "sha256-/fsNQvIIgcTPZHHIwr8sruEJpPJTmXbevoxy1GPmOOU=";
};

patches = [
Expand Down Expand Up @@ -75,6 +73,7 @@ python.pkgs.buildPythonApplication rec {
[
aeidon
ahocorasick-rs
altcha
(toPythonModule (borgbackup.override { python3 = python; }))
celery
certifi
Expand Down Expand Up @@ -103,6 +102,7 @@ python.pkgs.buildPythonApplication rec {
gitpython
hiredis
html2text
httpx
iniparse
jsonschema
lxml
Expand Down Expand Up @@ -131,6 +131,7 @@ python.pkgs.buildPythonApplication rec {
tesserocr
translate-toolkit
translation-finder
unidecode
user-agents
weblate-language-data
weblate-schemas
Expand Down
33 changes: 33 additions & 0 deletions pkgs/development/python-modules/altcha/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
48 changes: 48 additions & 0 deletions pkgs/development/python-modules/crochet/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
65 changes: 65 additions & 0 deletions pkgs/development/python-modules/fedora-messaging/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
14 changes: 7 additions & 7 deletions pkgs/development/python-modules/translation-finder/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
lib,
buildPythonPackage,
fetchPypi,
fetchFromGitHub,
setuptools,
charset-normalizer,
ruamel-yaml,
Expand All @@ -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 = [
Expand Down
25 changes: 0 additions & 25 deletions pkgs/development/python-modules/translation-finder/fix_tests.patch

This file was deleted.

10 changes: 7 additions & 3 deletions pkgs/development/python-modules/weblate-schemas/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];
Expand All @@ -31,7 +32,10 @@ buildPythonPackage rec {
strict-rfc3339
];

nativeCheckInputs = [ pytestCheckHook ];
nativeCheckInputs = [
fedora-messaging
pytestCheckHook
] ++ jsonschema.optional-dependencies.format;

pythonImportsCheck = [ "weblate_schemas" ];

Expand Down
6 changes: 6 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 { };
Expand Down

0 comments on commit e969a11

Please sign in to comment.