mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
[Backport release-26.05] weblate: 5.17 -> 2026.6.1 (#531965)
This commit is contained in:
commit
b0379aeb62
8 changed files with 111 additions and 43 deletions
|
|
@ -50,7 +50,7 @@ let
|
|||
in
|
||||
python3Packages.buildPythonApplication (finalAttrs: {
|
||||
pname = "weblate";
|
||||
version = "5.17";
|
||||
version = "2026.6.1";
|
||||
pyproject = true;
|
||||
|
||||
outputs = [
|
||||
|
|
@ -62,11 +62,14 @@ python3Packages.buildPythonApplication (finalAttrs: {
|
|||
owner = "WeblateOrg";
|
||||
repo = "weblate";
|
||||
tag = "weblate-${finalAttrs.version}";
|
||||
hash = "sha256-+czdS1cICvm8esXxJG9BjzPTJExajxvDoRVH7f+t6lY=";
|
||||
hash = "sha256-7dhEkU2sVIjMPPR/0U2sMFXG6bl8s5WDvw8MyZZhqNE=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
sed -i 's|/bin/true|true|g' weblate/addons/example_pre.py
|
||||
|
||||
sed -i 's/"setuptools==.*"/"setuptools"/' pyproject.toml
|
||||
sed -i 's/"translate-toolkit==.*"/"translate-toolkit"/' pyproject.toml
|
||||
'';
|
||||
|
||||
build-system = with python3Packages; [ setuptools ];
|
||||
|
|
@ -93,27 +96,40 @@ python3Packages.buildPythonApplication (finalAttrs: {
|
|||
${manage} compress
|
||||
'';
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"requests"
|
||||
"pygobject"
|
||||
"certifi"
|
||||
"hiredis"
|
||||
];
|
||||
# Upstream pins all dependencies, so their version constraints are mostly meanningless,
|
||||
# except for a few packages maintained by themselfes.
|
||||
# https://github.com/WeblateOrg/weblate/issues/20003#issuecomment-4691837274
|
||||
pythonRelaxDeps =
|
||||
let
|
||||
# Dependencies owned by Weblate that should always be in the exact version specified
|
||||
coreDeps = [
|
||||
"weblate-fonts"
|
||||
"weblate-schemas"
|
||||
"weblate-language-data"
|
||||
"translation-finder"
|
||||
"translate-toolkit"
|
||||
];
|
||||
in
|
||||
lib.concatMap (
|
||||
p: if !p ? "pname" || lib.elem p.pname coreDeps then [ ] else [ p.pname ]
|
||||
) finalAttrs.passthru.dependencies;
|
||||
|
||||
dependencies =
|
||||
with python3Packages;
|
||||
[
|
||||
ahocorasick-rs
|
||||
altcha
|
||||
argon2-cffi-bindings
|
||||
argon2-cffi
|
||||
(toPythonModule (borgbackup.override { python3 = python; }))
|
||||
celery
|
||||
certifi
|
||||
cffi
|
||||
charset-normalizer
|
||||
confusable-homoglyphs
|
||||
crispy-bootstrap5
|
||||
cryptography
|
||||
cssselect
|
||||
cython
|
||||
cyrtranslit
|
||||
dateparser
|
||||
diff-match-patch
|
||||
|
|
@ -143,13 +159,23 @@ python3Packages.buildPythonApplication (finalAttrs: {
|
|||
mistletoe
|
||||
nh3
|
||||
openpyxl
|
||||
opentelemetry-exporter-otlp-proto-http
|
||||
opentelemetry-instrumentation-celery
|
||||
opentelemetry-instrumentation-django
|
||||
opentelemetry-instrumentation-psycopg
|
||||
opentelemetry-instrumentation-redis
|
||||
opentelemetry-instrumentation-requests
|
||||
opentelemetry-sdk
|
||||
packaging
|
||||
pillow
|
||||
pyaskalono
|
||||
pyasn1
|
||||
pycairo
|
||||
pygments
|
||||
pygobject
|
||||
pyicumessageformat
|
||||
pyjwt
|
||||
pyopenssl
|
||||
pyparsing
|
||||
python-dateutil
|
||||
qrcode
|
||||
|
|
@ -165,6 +191,7 @@ python3Packages.buildPythonApplication (finalAttrs: {
|
|||
tesserocr
|
||||
translate-toolkit
|
||||
translation-finder
|
||||
twisted
|
||||
unidecode
|
||||
urllib3
|
||||
user-agents
|
||||
|
|
@ -190,10 +217,6 @@ python3Packages.buildPythonApplication (finalAttrs: {
|
|||
|
||||
# Commented entries are not packaged yet
|
||||
optional-dependencies = with python3Packages; {
|
||||
alibaba = [
|
||||
aliyun-python-sdk-alimt
|
||||
aliyun-python-sdk-core
|
||||
];
|
||||
amazon = [ boto3 ];
|
||||
# gelf = [ logging-gelf ];
|
||||
# gerrit = [ git-review ];
|
||||
|
|
@ -201,11 +224,17 @@ python3Packages.buildPythonApplication (finalAttrs: {
|
|||
google-cloud-storage
|
||||
google-cloud-translate
|
||||
];
|
||||
google-errors = [
|
||||
google-cloud-error-reporting
|
||||
];
|
||||
ldap = [ django-auth-ldap ];
|
||||
# mercurial = [ mercurial ];
|
||||
openai = [ openai ];
|
||||
postgres = [ psycopg ];
|
||||
saml = [ python3-saml ];
|
||||
rollbar = [ rollbar ];
|
||||
saml = [
|
||||
python3-saml
|
||||
xmlsec
|
||||
];
|
||||
# saml2idp = [ djangosaml2idp2 ];
|
||||
sphinx = [ sphinx ];
|
||||
# wllegal = [ wllegal ];
|
||||
|
|
@ -231,7 +260,6 @@ python3Packages.buildPythonApplication (finalAttrs: {
|
|||
pytest-django
|
||||
pytest-xdist
|
||||
responses
|
||||
respx
|
||||
selenium
|
||||
standardwebhooks
|
||||
|
||||
|
|
@ -307,6 +335,7 @@ python3Packages.buildPythonApplication (finalAttrs: {
|
|||
|
||||
# Tries to resolve DNS
|
||||
"weblate/api/tests.py::ProjectAPITest::test_install_machinery"
|
||||
"weblate/addons/tests.py::WebhooksAddonTest::test_form"
|
||||
|
||||
# djangosaml2idp2 is not packaged yet
|
||||
"weblate/utils/tests/test_djangosaml2idp.py"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
buildPythonPackage,
|
||||
pytestCheckHook,
|
||||
hatchling,
|
||||
opentelemetry-api,
|
||||
opentelemetry-instrumentation,
|
||||
opentelemetry-instrumentation-dbapi,
|
||||
opentelemetry-test-utils,
|
||||
psycopg,
|
||||
}:
|
||||
|
||||
buildPythonPackage {
|
||||
inherit (opentelemetry-instrumentation) version src;
|
||||
pname = "opentelemetry-instrumentation-psycopg";
|
||||
pyproject = true;
|
||||
|
||||
sourceRoot = "${opentelemetry-instrumentation.src.name}/instrumentation/opentelemetry-instrumentation-psycopg";
|
||||
|
||||
build-system = [ hatchling ];
|
||||
|
||||
dependencies = [
|
||||
psycopg
|
||||
opentelemetry-api
|
||||
opentelemetry-instrumentation
|
||||
opentelemetry-instrumentation-dbapi
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
opentelemetry-test-utils
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "opentelemetry.instrumentation.psycopg" ];
|
||||
|
||||
meta = opentelemetry-instrumentation.meta // {
|
||||
homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-psycopg";
|
||||
description = "OpenTelemetry Psycopg Instrumentation";
|
||||
};
|
||||
}
|
||||
|
|
@ -11,14 +11,14 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "social-auth-app-django";
|
||||
version = "5.8.0";
|
||||
version = "5.9.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "python-social-auth";
|
||||
repo = "social-app-django";
|
||||
tag = version;
|
||||
hash = "sha256-NAUCA+FMMgY4xMYspiRO5Kt/S2jbSKDRnBxwmATYxKo=";
|
||||
hash = "sha256-kyiN7HblqN66Slrub2IphCXBBy6UKxd7PbVHkjuHzkI=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
|
|
|||
|
|
@ -23,14 +23,14 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "social-auth-core";
|
||||
version = "4.8.5";
|
||||
version = "4.9.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "python-social-auth";
|
||||
repo = "social-core";
|
||||
tag = version;
|
||||
hash = "sha256-hYqfahjeNRpfpnNdDRTF9VPaoUh5R+nMDM3frvRI5Nw=";
|
||||
hash = "sha256-HIRqueDoT5MiK5wYto1/MhZOJVBGUdsHma/klOyVHtM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ setuptools ];
|
||||
|
|
|
|||
|
|
@ -29,18 +29,19 @@
|
|||
addBinToPathHook,
|
||||
pytest-xdist,
|
||||
gettext,
|
||||
syrupy,
|
||||
}:
|
||||
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "translate-toolkit";
|
||||
version = "3.19.5";
|
||||
version = "3.19.11";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "translate";
|
||||
repo = "translate";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-NJuhkJyXfGO2iwvcHUrfMZi55t1+89RN6jEIxHk8mcs=";
|
||||
hash = "sha256-+94oo6IYnRR4jnR60C3WNjesK6Tk6jND3xsYyx6sw0U=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools-scm ];
|
||||
|
|
@ -50,6 +51,8 @@ buildPythonPackage (finalAttrs: {
|
|||
unicode-segmentation-rs
|
||||
];
|
||||
|
||||
pythonRelaxDeps = [ "lxml" ];
|
||||
|
||||
optional-dependencies = {
|
||||
chardet = [ charset-normalizer ];
|
||||
fluent = [ fluent-syntax ];
|
||||
|
|
@ -69,6 +72,7 @@ buildPythonPackage (finalAttrs: {
|
|||
pytestCheckHook
|
||||
addBinToPathHook
|
||||
pytest-xdist
|
||||
syrupy
|
||||
gettext
|
||||
]
|
||||
++ lib.concatAttrValues finalAttrs.passthru.optional-dependencies;
|
||||
|
|
@ -78,12 +82,6 @@ buildPythonPackage (finalAttrs: {
|
|||
"test_timezones"
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# Require pytest-snapshot but there are no snapshots checked in
|
||||
"tests/translate/tools/test_pocount.py"
|
||||
"tests/translate/tools/test_junitmsgfmt.py"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "translate" ];
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "translation-finder";
|
||||
version = "2.24";
|
||||
version = "3.1";
|
||||
|
||||
pyproject = true;
|
||||
|
||||
|
|
@ -19,7 +19,7 @@ buildPythonPackage (finalAttrs: {
|
|||
owner = "WeblateOrg";
|
||||
repo = "translation-finder";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-OVAsw+snISVyz3ZvcfqCpv0BRfTNzYSpI+YLafW5OQg=";
|
||||
hash = "sha256-sRqn7K39R4A83USCng5wu14eKq4VqUp9tPzg8Qb8MOU=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
fqdn,
|
||||
jsonschema,
|
||||
|
|
@ -11,30 +11,28 @@
|
|||
pytestCheckHook,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "weblate-schemas";
|
||||
version = "2025.6";
|
||||
version = "2026.4";
|
||||
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "weblate_schemas";
|
||||
inherit version;
|
||||
hash = "sha256-Kxu+8CiJ343PmCdY5rSbTqsWmVMLnz9inAH726g5TQQ=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "WeblateOrg";
|
||||
repo = "weblate_schemas";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-OPuhRsUmVte54UPNna76N5Kbg1Tl7p8OdKbE6VHWcvg=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
fqdn
|
||||
jsonschema
|
||||
rfc3987
|
||||
strict-rfc3339
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
fedora-messaging
|
||||
pytestCheckHook
|
||||
fedora-messaging
|
||||
]
|
||||
++ jsonschema.optional-dependencies.format;
|
||||
|
||||
|
|
@ -43,9 +41,9 @@ buildPythonPackage rec {
|
|||
meta = {
|
||||
description = "Schemas used by Weblate";
|
||||
homepage = "https://github.com/WeblateOrg/weblate_schemas";
|
||||
changelog = "https://github.com/WeblateOrg/weblate_schemas/blob/${version}/CHANGES.rst";
|
||||
changelog = "https://github.com/WeblateOrg/weblate_schemas/blob/${finalAttrs.version}/CHANGES.rst";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ erictapen ];
|
||||
};
|
||||
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -11889,6 +11889,10 @@ self: super: with self; {
|
|||
callPackage ../development/python-modules/opentelemetry-instrumentation-logging
|
||||
{ };
|
||||
|
||||
opentelemetry-instrumentation-psycopg =
|
||||
callPackage ../development/python-modules/opentelemetry-instrumentation-psycopg
|
||||
{ };
|
||||
|
||||
opentelemetry-instrumentation-psycopg2 =
|
||||
callPackage ../development/python-modules/opentelemetry-instrumentation-psycopg2
|
||||
{ };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue