lol

Merge pull request #300485 from NickCao/flask-admin

python311Packages.flask-admin: adopt and modernize

authored by

Nick Cao and committed by
GitHub
cbfbeb30 2aa023ba

+34 -54
+34 -54
pkgs/development/python-modules/flask-admin/default.nix
··· 1 1 { lib 2 - , arrow 3 2 , azure-storage-blob 4 3 , boto 5 4 , buildPythonPackage 6 - , colour 7 - , email-validator 8 - , enum34 9 5 , fetchpatch 10 - , fetchPypi 6 + , fetchFromGitHub 11 7 , flask 12 - , flask-babelex 13 8 , flask-mongoengine 14 9 , flask-sqlalchemy 15 10 , geoalchemy2 ··· 19 14 , pymongo 20 15 , pytestCheckHook 21 16 , pythonOlder 17 + , setuptools 22 18 , shapely 23 19 , sqlalchemy 24 - , sqlalchemy-citext 25 - , sqlalchemy-utils 26 20 , wtf-peewee 27 21 , wtforms 28 22 }: ··· 30 24 buildPythonPackage rec { 31 25 pname = "flask-admin"; 32 26 version = "1.6.1"; 33 - format = "setuptools"; 27 + pyproject = true; 34 28 35 29 disabled = pythonOlder "3.8"; 36 30 37 - src = fetchPypi { 38 - pname = "Flask-Admin"; 39 - inherit version; 40 - hash = "sha256-JMrir4MramEaAdfcNfQtJmwdbHWkJrhp2MskG3gjM2k="; 31 + src = fetchFromGitHub { 32 + owner = "flask-admin"; 33 + repo = "flask-admin"; 34 + rev = "refs/tags/v${version}"; 35 + hash = "sha256-L8Q9uPpoen6ZvuF2bithCMSgc6X5khD1EqH2FJPspZc="; 41 36 }; 42 37 43 38 patches = [ ··· 49 44 }) 50 45 ]; 51 46 52 - propagatedBuildInputs = [ 47 + build-system = [ 48 + setuptools 49 + ]; 50 + 51 + dependencies = [ 53 52 flask 54 53 wtforms 55 54 ]; 56 55 57 - passthru.optional-dependencies = { 58 - aws = [ 59 - boto 60 - ]; 61 - azure = [ 62 - azure-storage-blob 63 - ]; 56 + optional-dependencies = { 57 + aws = [ boto ]; 58 + azure = [ azure-storage-blob ]; 64 59 }; 65 60 66 61 nativeCheckInputs = [ 67 - arrow 68 - colour 69 - email-validator 70 - flask-babelex 62 + pillow 63 + mongoengine 64 + pymongo 65 + wtf-peewee 66 + sqlalchemy 71 67 flask-mongoengine 72 68 flask-sqlalchemy 69 + # flask-babelex # broken and removed 70 + shapely 73 71 geoalchemy2 74 - mongoengine 75 - pillow 76 72 psycopg2 77 - pymongo 78 73 pytestCheckHook 79 - shapely 80 - sqlalchemy 81 - sqlalchemy-citext 82 - sqlalchemy-utils 83 - wtf-peewee 84 - ]; 85 - 86 - disabledTests = [ 87 - # Incompatible with werkzeug 2.1 88 - "test_mockview" 89 - # Tests are outdated and don't work with peewee 90 - "test_nested_flask_views" 91 - "test_export_csv" 92 - "test_list_row_actions" 93 - "test_column_editable_list" 94 - "test_column_filters" 95 - "test_export_csv" 96 74 ]; 97 75 98 76 disabledTestPaths = [ 99 - # Tests have additional requirements 100 - "flask_admin/tests/geoa/test_basic.py" 101 - "flask_admin/tests/mongoengine/test_basic.py" 102 - "flask_admin/tests/pymongo/test_basic.py" 77 + # depends on flask-babelex 103 78 "flask_admin/tests/sqla/test_basic.py" 104 79 "flask_admin/tests/sqla/test_form_rules.py" 105 - "flask_admin/tests/sqla/test_inlineform.py" 80 + "flask_admin/tests/sqla/test_multi_pk.py" 106 81 "flask_admin/tests/sqla/test_postgres.py" 107 82 "flask_admin/tests/sqla/test_translation.py" 108 - # RuntimeError: Working outside of application context. 109 - "flask_admin/tests/sqla/test_multi_pk.py" 110 - # Broken test 83 + # broken 84 + "flask_admin/tests/sqla/test_inlineform.py" 85 + "flask_admin/tests/test_model.py" 111 86 "flask_admin/tests/fileadmin/test_fileadmin.py" 87 + # requires database 88 + "flask_admin/tests/geoa/test_basic.py" 89 + "flask_admin/tests/pymongo/test_basic.py" 90 + "flask_admin/tests/mongoengine/test_basic.py" 91 + "flask_admin/tests/peeweemodel/test_basic.py" 112 92 ]; 113 93 114 94 pythonImportsCheck = [ ··· 120 100 homepage = "https://github.com/flask-admin/flask-admin/"; 121 101 changelog = "https://github.com/flask-admin/flask-admin/releases/tag/v${version}"; 122 102 license = licenses.bsd3; 123 - maintainers = with maintainers; [ ]; 103 + maintainers = with maintainers; [ nickcao ]; 124 104 }; 125 105 }