Unverified Commit a41d4c10 authored by Nick Cao's avatar Nick Cao
Browse files

python311Packages.flask-admin: modernize

parent ba5cd1cc
Loading
Loading
Loading
Loading
+27 −48
Original line number Diff line number Diff line
{ lib
, arrow
, azure-storage-blob
, boto
, buildPythonPackage
, colour
, email-validator
, enum34
, fetchpatch
, 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,7 +24,7 @@
buildPythonPackage rec {
  pname = "flask-admin";
  version = "1.6.1";
  format = "setuptools";
  pyproject = true;

  disabled = pythonOlder "3.8";

@@ -50,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 = [