1{ lib
2, buildPythonPackage
3, fetchPypi
4, flask
5, mock
6, flit-core
7, pytestCheckHook
8, pythonOlder
9, sqlalchemy
10}:
11
12buildPythonPackage rec {
13 pname = "flask-sqlalchemy";
14 version = "3.1.1";
15 format = "pyproject";
16
17 disabled = pythonOlder "3.9";
18
19 src = fetchPypi {
20 pname = "flask_sqlalchemy";
21 inherit version;
22 hash = "sha256-5LaLuIGALdoafYeLL8hMBtHuV/tAuHTT3Jfav6NrgxI=";
23 };
24
25 nativeBuildInputs = [
26 flit-core
27 ];
28
29 propagatedBuildInputs = [
30 flask
31 sqlalchemy
32 ];
33
34 nativeCheckInputs = [
35 mock
36 pytestCheckHook
37 ];
38
39 disabledTests = [
40 # flaky
41 "test_session_scoping_changing"
42 # https://github.com/pallets-eco/flask-sqlalchemy/issues/1084
43 "test_persist_selectable"
44 ];
45
46 pythonImportsCheck = [
47 "flask_sqlalchemy"
48 ];
49
50 meta = with lib; {
51 description = "SQLAlchemy extension for Flask";
52 homepage = "http://flask-sqlalchemy.pocoo.org/";
53 changelog = "https://github.com/pallets-eco/flask-sqlalchemy/blob/${version}/CHANGES.rst";
54 license = licenses.bsd3;
55 maintainers = with maintainers; [ gerschtli ];
56 };
57}