nixpkgs/pkgs/development/python-modules/sqlalchemy-continuum/default.nix
Robert Schütz 1a04744f74 treewide: remove superfluous disabled
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:

    pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
    for f in $(find -name '*.nix'); do
        grep -q "$pattern" "$f" || continue
        sed -i "/$pattern/d" "$f"
        if [ $(grep -c pythonOlder "$f") == 1 ]; then
            sed -i '/^\s*pythonOlder,\s*$/d' "$f"
        fi
        nixfmt "$f"
    done
2026-01-11 09:34:20 -08:00

70 lines
1.5 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
flask,
flask-login,
flask-sqlalchemy,
psycopg2,
pymysql,
pytestCheckHook,
sqlalchemy,
sqlalchemy-i18n,
sqlalchemy-utils,
}:
buildPythonPackage rec {
pname = "sqlalchemy-continuum";
version = "1.4.2";
pyproject = true;
src = fetchPypi {
pname = "sqlalchemy_continuum";
inherit version;
hash = "sha256-D9K+efcY7aR8IgaHnZLsTr8YiTZGN7PK8+5dNL0ZyOM=";
};
build-system = [ setuptools ];
dependencies = [
sqlalchemy
sqlalchemy-utils
];
optional-dependencies = {
flask = [ flask ];
flask-login = [ flask-login ];
flask-sqlalchemy = [ flask-sqlalchemy ];
i18n = [ sqlalchemy-i18n ];
};
nativeCheckInputs = [
psycopg2
pymysql
pytestCheckHook
]
++ optional-dependencies.flask
++ optional-dependencies.flask-login
++ optional-dependencies.flask-sqlalchemy;
disabledTestPaths = [
# requires sqlalchemy-i18n, which is incompatible with sqlalchemy>=2
"tests/test_i18n.py"
];
preCheck = ''
# Indicate tests that we don't have a database server at hand
export DB=sqlite
'';
pythonImportsCheck = [ "sqlalchemy_continuum" ];
meta = {
description = "Versioning and auditing extension for SQLAlchemy";
homepage = "https://github.com/kvesteri/sqlalchemy-continuum/";
changelog = "https://github.com/kvesteri/sqlalchemy-continuum/blob/${version}/CHANGES.rst";
license = lib.licenses.bsd3;
maintainers = [ ];
};
}