python3Packages.wegtail-localize: cleanup
This commit is contained in:
@@ -1,19 +1,26 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
dj-database-url,
|
||||
django,
|
||||
django-rq,
|
||||
fetchFromGitHub,
|
||||
|
||||
# build-system
|
||||
flit-core,
|
||||
freezegun,
|
||||
google-cloud-translate,
|
||||
|
||||
# dependencies
|
||||
django,
|
||||
polib,
|
||||
python,
|
||||
pythonOlder,
|
||||
typing-extensions,
|
||||
wagtail,
|
||||
wagtail-modeladmin,
|
||||
|
||||
# optional-dependencies
|
||||
google-cloud-translate,
|
||||
|
||||
# tests
|
||||
dj-database-url,
|
||||
django-rq,
|
||||
fetchFromGitHub,
|
||||
freezegun,
|
||||
python,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@@ -21,8 +28,6 @@ buildPythonPackage rec {
|
||||
version = "1.12.2";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "wagtail-localize";
|
||||
owner = "wagtail";
|
||||
@@ -34,12 +39,16 @@ buildPythonPackage rec {
|
||||
|
||||
dependencies = [
|
||||
django
|
||||
wagtail
|
||||
polib
|
||||
typing-extensions
|
||||
wagtail
|
||||
wagtail-modeladmin
|
||||
];
|
||||
|
||||
optional-dependencies = {
|
||||
google = [ google-cloud-translate ];
|
||||
};
|
||||
|
||||
nativeCheckInputs = [
|
||||
dj-database-url
|
||||
django-rq
|
||||
@@ -47,21 +56,22 @@ buildPythonPackage rec {
|
||||
google-cloud-translate
|
||||
];
|
||||
|
||||
optional-dependencies = {
|
||||
google = [ google-cloud-translate ];
|
||||
};
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
# test_translate_html fails with later Beautifulsoup releases
|
||||
rm wagtail_localize/machine_translators/tests/test_dummy_translator.py
|
||||
|
||||
${python.interpreter} testmanage.py test
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Translation plugin for Wagtail CMS";
|
||||
homepage = "https://github.com/wagtail/wagtail-localize";
|
||||
changelog = "https://github.com/wagtail/wagtail-localize/blob/${src.tag}/CHANGELOG.md";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ sephi ];
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ sephi ];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user