diff options
author | Nick Cao <nickcao@nichi.co> | 2024-04-08 14:24:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-08 14:24:37 -0400 |
commit | cbfbeb308c2147a7d88edb6b5dc2db16d2994a06 (patch) | |
tree | cbc8cb5e2a382aaa8f7eae030516551807b75b2c /pkgs/development | |
parent | 2aa023baf5260bf1a8e54ae57cde03e96b4c38e5 (diff) | |
parent | a41d4c10cc9e097d28ba138da88108a85387dfb9 (diff) |
Merge pull request #300485 from NickCao/flask-admin
python311Packages.flask-admin: adopt and modernize
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/python-modules/flask-admin/default.nix | 88 |
1 files changed, 34 insertions, 54 deletions
diff --git a/pkgs/development/python-modules/flask-admin/default.nix b/pkgs/development/python-modules/flask-admin/default.nix index c4d686c014782..ae12e6353e2b8 100644 --- a/pkgs/development/python-modules/flask-admin/default.nix +++ b/pkgs/development/python-modules/flask-admin/default.nix @@ -1,15 +1,10 @@ { lib -, arrow , azure-storage-blob , boto , buildPythonPackage -, colour -, email-validator -, enum34 , fetchpatch -, fetchPypi +, fetchFromGitHub , flask -, flask-babelex , flask-mongoengine , flask-sqlalchemy , geoalchemy2 @@ -19,10 +14,9 @@ , pymongo , pytestCheckHook , pythonOlder +, setuptools , shapely , sqlalchemy -, sqlalchemy-citext -, sqlalchemy-utils , wtf-peewee , wtforms }: @@ -30,14 +24,15 @@ buildPythonPackage rec { pname = "flask-admin"; version = "1.6.1"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.8"; - src = fetchPypi { - pname = "Flask-Admin"; - inherit version; - hash = "sha256-JMrir4MramEaAdfcNfQtJmwdbHWkJrhp2MskG3gjM2k="; + src = fetchFromGitHub { + owner = "flask-admin"; + repo = "flask-admin"; + rev = "refs/tags/v${version}"; + hash = "sha256-L8Q9uPpoen6ZvuF2bithCMSgc6X5khD1EqH2FJPspZc="; }; patches = [ @@ -49,66 +44,51 @@ buildPythonPackage rec { }) ]; - propagatedBuildInputs = [ + build-system = [ + setuptools + ]; + + dependencies = [ flask wtforms ]; - passthru.optional-dependencies = { - aws = [ - boto - ]; - azure = [ - azure-storage-blob - ]; + optional-dependencies = { + aws = [ boto ]; + azure = [ azure-storage-blob ]; }; nativeCheckInputs = [ - arrow - colour - email-validator - flask-babelex + pillow + mongoengine + pymongo + wtf-peewee + sqlalchemy flask-mongoengine flask-sqlalchemy + # flask-babelex # broken and removed + shapely geoalchemy2 - mongoengine - pillow psycopg2 - pymongo pytestCheckHook - shapely - sqlalchemy - sqlalchemy-citext - sqlalchemy-utils - wtf-peewee - ]; - - disabledTests = [ - # Incompatible with werkzeug 2.1 - "test_mockview" - # Tests are outdated and don't work with peewee - "test_nested_flask_views" - "test_export_csv" - "test_list_row_actions" - "test_column_editable_list" - "test_column_filters" - "test_export_csv" ]; disabledTestPaths = [ - # Tests have additional requirements - "flask_admin/tests/geoa/test_basic.py" - "flask_admin/tests/mongoengine/test_basic.py" - "flask_admin/tests/pymongo/test_basic.py" + # depends on flask-babelex "flask_admin/tests/sqla/test_basic.py" "flask_admin/tests/sqla/test_form_rules.py" - "flask_admin/tests/sqla/test_inlineform.py" + "flask_admin/tests/sqla/test_multi_pk.py" "flask_admin/tests/sqla/test_postgres.py" "flask_admin/tests/sqla/test_translation.py" - # RuntimeError: Working outside of application context. - "flask_admin/tests/sqla/test_multi_pk.py" - # Broken test + # broken + "flask_admin/tests/sqla/test_inlineform.py" + "flask_admin/tests/test_model.py" "flask_admin/tests/fileadmin/test_fileadmin.py" + # requires database + "flask_admin/tests/geoa/test_basic.py" + "flask_admin/tests/pymongo/test_basic.py" + "flask_admin/tests/mongoengine/test_basic.py" + "flask_admin/tests/peeweemodel/test_basic.py" ]; pythonImportsCheck = [ @@ -120,6 +100,6 @@ buildPythonPackage rec { homepage = "https://github.com/flask-admin/flask-admin/"; changelog = "https://github.com/flask-admin/flask-admin/releases/tag/v${version}"; license = licenses.bsd3; - maintainers = with maintainers; [ ]; + maintainers = with maintainers; [ nickcao ]; }; } |