2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2023-01-20 10:41:00 +00:00
|
|
|
, pythonOlder
|
|
|
|
|
|
|
|
# runtime
|
|
|
|
, importlib-metadata
|
2022-06-16 17:23:12 +00:00
|
|
|
, sqlalchemy
|
2023-01-20 10:41:00 +00:00
|
|
|
|
|
|
|
# optionals
|
|
|
|
, babel
|
|
|
|
, arrow
|
|
|
|
, pendulum
|
|
|
|
#, intervals
|
|
|
|
, phonenumbers
|
|
|
|
, passlib
|
2022-06-16 17:23:12 +00:00
|
|
|
, colour
|
2023-01-20 10:41:00 +00:00
|
|
|
, python-dateutil
|
|
|
|
, furl
|
|
|
|
, cryptography
|
|
|
|
|
|
|
|
# tests
|
|
|
|
, pytestCheckHook
|
|
|
|
, pygments
|
2022-06-16 17:23:12 +00:00
|
|
|
, jinja2
|
2023-01-20 10:41:00 +00:00
|
|
|
, docutils
|
|
|
|
, flexmock
|
|
|
|
, psycopg2
|
|
|
|
, psycopg2cffi
|
2022-06-16 17:23:12 +00:00
|
|
|
, pg8000
|
2023-01-20 10:41:00 +00:00
|
|
|
, pytz
|
|
|
|
, backports-zoneinfo
|
2022-06-16 17:23:12 +00:00
|
|
|
, pymysql
|
2023-01-20 10:41:00 +00:00
|
|
|
, pyodbc
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sqlalchemy-utils";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "0.40.0";
|
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";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-r4AwiaeSmAP662FzuQ8p0aZ60C8dHnMvQLBUqOs8c3A=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
patches = [
|
|
|
|
./skip-database-tests.patch
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
sqlalchemy
|
2023-01-20 10:41:00 +00:00
|
|
|
] ++ 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 ];
|
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-01-20 10:41:00 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pygments
|
2020-04-24 23:36:52 +00:00
|
|
|
jinja2
|
2023-01-20 10:41:00 +00:00
|
|
|
docutils
|
|
|
|
flexmock
|
|
|
|
psycopg2
|
|
|
|
psycopg2cffi
|
2020-04-24 23:36:52 +00:00
|
|
|
pg8000
|
2023-01-20 10:41:00 +00:00
|
|
|
pytz
|
2021-07-04 02:40:35 +00:00
|
|
|
python-dateutil
|
2023-01-20 10:41:00 +00:00
|
|
|
pymysql
|
|
|
|
pyodbc
|
|
|
|
]
|
|
|
|
++ lib.flatten (builtins.attrValues passthru.optional-dependencies)
|
|
|
|
++ 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"
|
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 ];
|
|
|
|
};
|
|
|
|
}
|