1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 setuptools, 6 flask, 7 flask-login, 8 flask-sqlalchemy, 9 psycopg2, 10 pymysql, 11 pytestCheckHook, 12 pythonOlder, 13 sqlalchemy, 14 sqlalchemy-i18n, 15 sqlalchemy-utils, 16}: 17 18buildPythonPackage rec { 19 pname = "sqlalchemy-continuum"; 20 version = "1.4.2"; 21 pyproject = true; 22 23 disabled = pythonOlder "3.7"; 24 25 src = fetchPypi { 26 pname = "sqlalchemy_continuum"; 27 inherit version; 28 hash = "sha256-D9K+efcY7aR8IgaHnZLsTr8YiTZGN7PK8+5dNL0ZyOM="; 29 }; 30 31 build-system = [ setuptools ]; 32 33 dependencies = [ 34 sqlalchemy 35 sqlalchemy-utils 36 ]; 37 38 optional-dependencies = { 39 flask = [ flask ]; 40 flask-login = [ flask-login ]; 41 flask-sqlalchemy = [ flask-sqlalchemy ]; 42 i18n = [ sqlalchemy-i18n ]; 43 }; 44 45 nativeCheckInputs = 46 [ 47 psycopg2 48 pymysql 49 pytestCheckHook 50 ] 51 ++ optional-dependencies.flask 52 ++ optional-dependencies.flask-login 53 ++ optional-dependencies.flask-sqlalchemy; 54 55 disabledTestPaths = [ 56 # requires sqlalchemy-i18n, which is incompatible with sqlalchemy>=2 57 "tests/test_i18n.py" 58 ]; 59 60 preCheck = '' 61 # Indicate tests that we don't have a database server at hand 62 export DB=sqlite 63 ''; 64 65 pythonImportsCheck = [ "sqlalchemy_continuum" ]; 66 67 meta = with lib; { 68 description = "Versioning and auditing extension for SQLAlchemy"; 69 homepage = "https://github.com/kvesteri/sqlalchemy-continuum/"; 70 changelog = "https://github.com/kvesteri/sqlalchemy-continuum/blob/${version}/CHANGES.rst"; 71 license = licenses.bsd3; 72 maintainers = [ ]; 73 }; 74}