2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
pythonOlder,
|
2023-01-20 10:41:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# runtime
|
|
|
|
importlib-metadata,
|
|
|
|
sqlalchemy,
|
2023-01-20 10:41:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# optionals
|
|
|
|
babel,
|
|
|
|
arrow,
|
|
|
|
pendulum,
|
|
|
|
#, intervals
|
|
|
|
phonenumbers,
|
|
|
|
passlib,
|
|
|
|
colour,
|
|
|
|
python-dateutil,
|
|
|
|
furl,
|
|
|
|
cryptography,
|
2023-01-20 10:41:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# tests
|
|
|
|
pytestCheckHook,
|
|
|
|
pygments,
|
|
|
|
jinja2,
|
|
|
|
docutils,
|
|
|
|
flexmock,
|
|
|
|
psycopg2,
|
|
|
|
psycopg2cffi,
|
|
|
|
pg8000,
|
|
|
|
pytz,
|
|
|
|
backports-zoneinfo,
|
|
|
|
pymysql,
|
|
|
|
pyodbc,
|
2023-01-20 10:41:00 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sqlalchemy-utils";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.41.2";
|
2023-01-20 10:41:00 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit version;
|
|
|
|
pname = "SQLAlchemy-Utils";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-vFmcjDszGeU85sXDxHESC9Ml0AcftvOKEOkk49B7mZA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
patches = [ ./skip-database-tests.patch ];
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ sqlalchemy ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
babel = [ babel ];
|
|
|
|
arrow = [ arrow ];
|
|
|
|
pendulum = [ pendulum ];
|
|
|
|
#intervals = [ intervals ];
|
|
|
|
phone = [ phonenumbers ];
|
|
|
|
password = [ passlib ];
|
|
|
|
color = [ colour ];
|
|
|
|
timezone = [ python-dateutil ];
|
|
|
|
url = [ furl ];
|
|
|
|
encrypted = [ cryptography ];
|
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs =
|
|
|
|
[
|
|
|
|
pytestCheckHook
|
|
|
|
pygments
|
|
|
|
jinja2
|
|
|
|
docutils
|
|
|
|
flexmock
|
|
|
|
psycopg2
|
|
|
|
pg8000
|
|
|
|
pytz
|
|
|
|
python-dateutil
|
|
|
|
pymysql
|
|
|
|
pyodbc
|
|
|
|
]
|
|
|
|
++ lib.flatten (builtins.attrValues passthru.optional-dependencies)
|
|
|
|
++ lib.optionals (pythonOlder "3.12") [
|
|
|
|
# requires distutils, which were removed in 3.12
|
|
|
|
psycopg2cffi
|
|
|
|
]
|
|
|
|
++ lib.optionals (pythonOlder "3.9") [ backports-zoneinfo ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"--deselect tests/functions/test_database.py::TestDatabasePostgresCreateDatabaseCloseConnection::test_create_database_twice"
|
|
|
|
"--deselect tests/functions/test_database.py::TestDatabasePostgresPg8000::test_create_and_drop"
|
|
|
|
"--deselect tests/functions/test_database.py::TestDatabasePostgresPsycoPG2CFFI::test_create_and_drop"
|
2023-11-16 04:20:00 +00:00
|
|
|
"--deselect tests/functions/test_database.py::TestDatabasePostgresPsycoPG3::test_create_and_drop"
|
2022-06-16 17:23:12 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2023-01-20 10:41:00 +00:00
|
|
|
changelog = "https://github.com/kvesteri/sqlalchemy-utils/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/kvesteri/sqlalchemy-utils";
|
|
|
|
description = "Various utility functions and datatypes for SQLAlchemy";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ eadwu ];
|
|
|
|
};
|
|
|
|
}
|