2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2024-02-29 20:09:43 +00:00
|
|
|
, fetchpatch
|
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";
|
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
|
|
|
};
|
|
|
|
|
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
|
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)
|
2024-04-21 15:54:59 +00:00
|
|
|
++ lib.optionals (pythonOlder "3.12") [
|
|
|
|
# requires distutils, which were removed in 3.12
|
|
|
|
psycopg2cffi
|
|
|
|
]
|
2023-01-20 10:41:00 +00:00
|
|
|
++ 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 ];
|
|
|
|
};
|
|
|
|
}
|