pythonPackages.sqlbag: init at 0.1.1617247075

This commit is contained in:
Soispha 2023-09-02 23:57:08 +02:00
parent 6f66321bf7
commit 2bd1c26531
No known key found for this signature in database
GPG Key ID: A5E94010C3A642AD
2 changed files with 97 additions and 0 deletions

View File

@ -0,0 +1,95 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, isPy27
, psycopg2
, pymysql
, sqlalchemy
, pathlib
, six
, flask
, pendulum
, packaging
, setuptools
, poetry-core
, pytestCheckHook
, pytest-xdist
, pytest-sugar
, postgresql
, postgresqlTestHook
,
}:
buildPythonPackage rec {
pname = "sqlbag";
version = "0.1.1617247075";
format = "pyproject";
src = fetchFromGitHub {
owner = "djrobstep";
repo = pname;
# no tags on github, version patch number is unix time.
rev = "eaaeec4158ffa139fba1ec30d7887f4d836f4120";
hash = "sha256-lipgnkqrzjzqwbhtVcWDQypBNzq6Dct/qoM8y/FNiNs=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs =
[
sqlalchemy
six
packaging
psycopg2
pymysql
setuptools # needed for 'pkg_resources'
]
++ lib.optional isPy27 pathlib;
nativeCheckInputs = [
pytestCheckHook
pytest-xdist
pytest-sugar
postgresql
postgresqlTestHook
flask
pendulum
];
preCheck = ''
export PGUSER="nixbld";
'';
disabledTests = [
# These all fail with "List argument must consist only of tuples or dictionaries":
# Related issue: https://github.com/djrobstep/sqlbag/issues/14
"test_basic"
"test_createdrop"
"test_errors_and_messages"
"test_flask_integration"
"test_orm_stuff"
"test_pendulum_for_time_types"
"test_transaction_separation"
];
pytestFlagsArray = [
"-x"
"-svv"
"tests"
];
pythonImportsCheck = [
"sqlbag"
];
meta = with lib; {
description = "Handy python code for doing database things";
homepage = "https://github.com/djrobstep/sqlbag";
license = with licenses; [ unlicense ];
maintainers = with maintainers; [ soispha ];
};
}

View File

@ -12344,6 +12344,8 @@ self: super: with self; {
sqlalchemy-views = callPackage ../development/python-modules/sqlalchemy-views { };
sqlbag = callPackage ../development/python-modules/sqlbag { };
sqlglot = callPackage ../development/python-modules/sqlglot { };
sqlitedict = callPackage ../development/python-modules/sqlitedict { };