nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

python312Packages.wagtail[-modeladmin]: fix (#399723)

authored by

Gaétan Lepage and committed by
GitHub
e0769694 94769ea8

+122 -39
+2 -5
pkgs/development/python-modules/dj-database-url/default.nix
··· 3 3 buildPythonPackage, 4 4 fetchFromGitHub, 5 5 django, 6 - pythonOlder, 7 6 setuptools, 8 7 typing-extensions, 9 8 }: ··· 11 12 pname = "dj-database-url"; 12 13 version = "2.3.0"; 13 14 pyproject = true; 14 - 15 - disabled = pythonOlder "3.9"; 16 15 17 16 src = fetchFromGitHub { 18 17 owner = "jazzband"; ··· 31 34 32 35 pythonImportsCheck = [ "dj_database_url" ]; 33 36 34 - meta = with lib; { 37 + meta = { 35 38 description = "Use Database URLs in your Django Application"; 36 39 homepage = "https://github.com/jazzband/dj-database-url"; 37 40 changelog = "https://github.com/jazzband/dj-database-url/blob/v${version}/CHANGELOG.md"; 38 - license = licenses.bsd2; 41 + license = lib.licenses.bsd2; 39 42 maintainers = [ ]; 40 43 }; 41 44 }
+68
pkgs/development/python-modules/django-tasks/default.nix
··· 1 + { 2 + lib, 3 + buildPythonPackage, 4 + fetchFromGitHub, 5 + setuptools, 6 + django, 7 + django-stubs-ext, 8 + typing-extensions, 9 + mysqlclient, 10 + psycopg, 11 + dj-database-url, 12 + python, 13 + }: 14 + 15 + buildPythonPackage rec { 16 + pname = "django-tasks"; 17 + version = "0.6.1"; 18 + pyproject = true; 19 + 20 + src = fetchFromGitHub { 21 + owner = "RealOrangeOne"; 22 + repo = "django-tasks"; 23 + tag = version; 24 + hash = "sha256-MLztM4jVQV2tHPcIExbPGX+hCHSTqaQJeTbQqaVA3V4="; 25 + }; 26 + 27 + build-system = [ 28 + setuptools 29 + ]; 30 + 31 + dependencies = [ 32 + django 33 + django-stubs-ext 34 + typing-extensions 35 + ]; 36 + 37 + optional-dependencies = { 38 + mysql = [ 39 + mysqlclient 40 + ]; 41 + postgres = [ 42 + psycopg 43 + ]; 44 + }; 45 + 46 + pythonImportsCheck = [ "django_tasks" ]; 47 + 48 + nativeCheckInputs = [ 49 + dj-database-url 50 + ]; 51 + 52 + checkPhase = '' 53 + runHook preCheck 54 + 55 + export DJANGO_SETTINGS_MODULE="tests.settings" 56 + ${python.interpreter} -m manage test --noinput 57 + 58 + runHook postCheck 59 + ''; 60 + 61 + meta = { 62 + description = "Reference implementation and backport of background workers and tasks in Django"; 63 + homepage = "https://github.com/RealOrangeOne/django-tasks"; 64 + changelog = "https://github.com/RealOrangeOne/django-tasks/releases/tag/${version}"; 65 + license = lib.licenses.bsd3; 66 + maintainers = with lib.maintainers; [ GaetanLepage ]; 67 + }; 68 + }
+24 -11
pkgs/development/python-modules/wagtail-modeladmin/default.nix
··· 1 1 { 2 2 lib, 3 3 buildPythonPackage, 4 - dj-database-url, 5 4 fetchFromGitHub, 6 5 flit-core, 7 - python, 8 - pythonOlder, 9 6 wagtail, 7 + dj-database-url, 8 + python, 10 9 }: 11 10 12 11 buildPythonPackage rec { ··· 13 14 version = "2.1.0"; 14 15 pyproject = true; 15 16 16 - disabled = pythonOlder "3.8"; 17 - 18 17 src = fetchFromGitHub { 19 - repo = pname; 20 18 owner = "wagtail-nest"; 19 + repo = "wagtail-modeladmin"; 21 20 tag = "v${version}"; 22 21 hash = "sha256-IG7e7YomMM7K2IlJ1Dr1zo+blDPHnu/JeS5csos8ncc="; 23 22 }; 24 23 25 - nativeBuildInputs = [ flit-core ]; 24 + # Fail with `AssertionError` 25 + # AssertionError: <Warning: level=30,... > not found in [<Warning: ...>] 26 + postPatch = '' 27 + substituteInPlace wagtail_modeladmin/test/tests/test_simple_modeladmin.py \ 28 + --replace-fail \ 29 + "def test_model_with_single_tabbed_panel_only(" \ 30 + "def no_test_model_with_single_tabbed_panel_only(" \ 31 + --replace-fail \ 32 + "def test_model_with_two_tabbed_panels_only(" \ 33 + "def no_test_model_with_two_tabbed_panels_only(" 34 + ''; 26 35 27 - propagatedBuildInputs = [ wagtail ]; 36 + build-system = [ flit-core ]; 37 + 38 + dependencies = [ 39 + wagtail 40 + ]; 28 41 29 42 nativeCheckInputs = [ dj-database-url ]; 30 43 ··· 44 33 45 34 checkPhase = '' 46 35 runHook preCheck 36 + 47 37 ${python.interpreter} testmanage.py test 38 + 48 39 runHook postCheck 49 40 ''; 50 41 51 - meta = with lib; { 42 + meta = { 52 43 description = "Add any model in your project to the Wagtail admin. Formerly wagtail.contrib.modeladmin"; 53 44 homepage = "https://github.com/wagtail-nest/wagtail-modeladmin"; 54 45 changelog = "https://github.com/wagtail/wagtail-modeladmin/blob/v${version}/CHANGELOG.md"; 55 - license = licenses.bsd3; 56 - maintainers = with maintainers; [ sephi ]; 46 + license = lib.licenses.bsd3; 47 + maintainers = with lib.maintainers; [ sephi ]; 57 48 }; 58 49 }
+26 -23
pkgs/development/python-modules/wagtail/default.nix
··· 1 1 { 2 2 lib, 3 + buildPythonPackage, 4 + fetchFromGitHub, 5 + 6 + # build-system 7 + setuptools, 8 + 9 + # dependencies 3 10 anyascii, 4 11 beautifulsoup4, 5 - buildPythonPackage, 6 - callPackage, 7 12 django, 8 13 django-filter, 9 14 django-modelcluster, 10 15 django-taggit, 16 + django-tasks, 11 17 django-treebeard, 12 18 djangorestframework, 13 19 draftjs-exporter, 14 - fetchPypi, 15 - html5lib, 16 - l18n, 17 20 laces, 18 21 openpyxl, 19 22 permissionedforms, 20 23 pillow, 21 - pythonOlder, 22 24 requests, 23 25 telepath, 24 26 willow, 27 + 28 + # tests 29 + callPackage, 25 30 }: 26 31 27 32 buildPythonPackage rec { 28 33 pname = "wagtail"; 29 34 version = "6.4.1"; 30 - format = "setuptools"; 35 + pyproject = true; 31 36 32 - disabled = pythonOlder "3.8"; 33 - 34 - src = fetchPypi { 35 - inherit pname version; 36 - hash = "sha256-zsPm1JIKbRePoetvSvgLNw/dVXDtkkuXkQThV/EMoJc="; 37 + src = fetchFromGitHub { 38 + owner = "wagtail"; 39 + repo = "wagtail"; 40 + tag = "v${version}"; 41 + hash = "sha256-2qixbJK3f+3SBnsfVEcObFJmuBvE2J9o3LIkILZQRLQ="; 37 42 }; 38 43 39 - postPatch = '' 40 - substituteInPlace setup.py \ 41 - --replace "django-filter>=23.3,<24" "django-filter>=23.3,<24.3" 42 - ''; 44 + build-system = [ 45 + setuptools 46 + ]; 43 47 44 - propagatedBuildInputs = [ 48 + dependencies = [ 45 49 anyascii 46 50 beautifulsoup4 47 51 django 48 - django-treebeard 49 52 django-filter 50 53 django-modelcluster 51 54 django-taggit 55 + django-tasks 56 + django-treebeard 52 57 djangorestframework 53 58 draftjs-exporter 54 - html5lib 55 - l18n 56 59 laces 57 60 openpyxl 58 61 permissionedforms ··· 73 70 74 71 pythonImportsCheck = [ "wagtail" ]; 75 72 76 - meta = with lib; { 73 + meta = { 77 74 description = "Django content management system focused on flexibility and user experience"; 78 75 mainProgram = "wagtail"; 79 76 homepage = "https://github.com/wagtail/wagtail"; 80 77 changelog = "https://github.com/wagtail/wagtail/blob/v${version}/CHANGELOG.txt"; 81 - license = licenses.bsd3; 82 - maintainers = with maintainers; [ sephi ]; 78 + license = lib.licenses.bsd3; 79 + maintainers = with lib.maintainers; [ sephi ]; 83 80 }; 84 81 }
+2
pkgs/top-level/python-packages.nix
··· 3880 3880 3881 3881 django-taggit = callPackage ../development/python-modules/django-taggit { }; 3882 3882 3883 + django-tasks = callPackage ../development/python-modules/django-tasks { }; 3884 + 3883 3885 django-tastypie = callPackage ../development/python-modules/django-tastypie { }; 3884 3886 3885 3887 django-tenants = callPackage ../development/python-modules/django-tenants { };