depot/third_party/nixpkgs/pkgs/development/python-modules/flask-appbuilder/default.nix
Default email 4d5a95770c Project import generated by Copybara.
GitOrigin-RevId: 3c5319ad3aa51551182ac82ea17ab1c6b0f0df89
2023-03-04 15:14:45 +03:00

88 lines
1.9 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, apispec
, colorama
, click
, email-validator
, flask
, flask-babel
, flask-login
, flask-openid
, flask-sqlalchemy
, flask-wtf
, flask-jwt-extended
, jsonschema
, marshmallow
, marshmallow-enum
, marshmallow-sqlalchemy
, python-dateutil
, pythonOlder
, prison
, pyjwt
, pyyaml
, sqlalchemy-utils
}:
buildPythonPackage rec {
pname = "flask-appbuilder";
version = "4.2.1";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
pname = "Flask-AppBuilder";
inherit version;
hash = "sha256-rZbu0Bif5pOa/zu6MCrbGJpkqUdYzWyVgp6tqRzGyIc=";
};
propagatedBuildInputs = [
apispec
colorama
click
email-validator
flask
flask-babel
flask-login
flask-openid
flask-sqlalchemy
flask-wtf
flask-jwt-extended
jsonschema
marshmallow
marshmallow-enum
marshmallow-sqlalchemy
python-dateutil
prison
pyjwt
pyyaml
sqlalchemy-utils
] ++ apispec.optional-dependencies.yaml;
postPatch = ''
substituteInPlace setup.py \
--replace "apispec[yaml]>=3.3, <6" "apispec[yaml]" \
--replace "Flask-SQLAlchemy>=2.4, <3" "Flask-SQLAlchemy" \
--replace "Flask-Babel>=1, <3" "Flask-Babel" \
--replace "marshmallow-sqlalchemy>=0.22.0, <0.27.0" "marshmallow-sqlalchemy" \
--replace "prison>=0.2.1, <1.0.0" "prison"
'';
# Majority of tests require network access or mongo
doCheck = false;
pythonImportsCheck = [
"flask_appbuilder"
];
meta = with lib; {
description = "Application development framework, built on top of Flask";
homepage = "https://github.com/dpgaspar/flask-appbuilder/";
changelog = "https://github.com/dpgaspar/Flask-AppBuilder/blob/v${version}/CHANGELOG.rst";
license = licenses.bsd3;
maintainers = with maintainers; [ costrouc ];
# Support for flask-sqlalchemy >= 3.0 is missing, https://github.com/dpgaspar/Flask-AppBuilder/pull/1940
broken = true;
};
}