Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / sqlbag / default.nix
blob8b21d89ad5da5abf90097b1158105f9fb729a1a4
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , isPy27
5 , psycopg2
6 , pymysql
7 , sqlalchemy
8 , pathlib
9 , six
10 , flask
11 , pendulum
12 , packaging
13 , setuptools
14 , poetry-core
15 , pytestCheckHook
16 , pytest-xdist
17 , pytest-sugar
18 , postgresql
19 , postgresqlTestHook
22 buildPythonPackage rec {
23   pname = "sqlbag";
24   version = "0.1.1617247075";
25   format = "pyproject";
27   src = fetchFromGitHub {
28     owner = "djrobstep";
29     repo = pname;
30     # no tags on github, version patch number is unix time.
31     rev = "eaaeec4158ffa139fba1ec30d7887f4d836f4120";
32     hash = "sha256-lipgnkqrzjzqwbhtVcWDQypBNzq6Dct/qoM8y/FNiNs=";
33   };
35   nativeBuildInputs = [
36     poetry-core
37   ];
39   propagatedBuildInputs =
40     [
41       sqlalchemy
42       six
43       packaging
45       psycopg2
46       pymysql
48       setuptools # needed for 'pkg_resources'
49     ]
50     ++ lib.optional isPy27 pathlib;
52   nativeCheckInputs = [
53     pytestCheckHook
54     pytest-xdist
55     pytest-sugar
57     postgresql
58     postgresqlTestHook
60     flask
61     pendulum
62   ];
64   preCheck = ''
65     export PGUSER="nixbld";
66   '';
67   disabledTests = [
68     # These all fail with "List argument must consist only of tuples or dictionaries":
69     # Related issue: https://github.com/djrobstep/sqlbag/issues/14
70     "test_basic"
71     "test_createdrop"
72     "test_errors_and_messages"
73     "test_flask_integration"
74     "test_orm_stuff"
75     "test_pendulum_for_time_types"
76     "test_transaction_separation"
77   ];
79   pytestFlagsArray = [
80     "-x"
81     "-svv"
82     "tests"
83   ];
85   pythonImportsCheck = [
86     "sqlbag"
87   ];
89   meta = with lib; {
90     description = "Handy python code for doing database things";
91     homepage = "https://github.com/djrobstep/sqlbag";
92     license = with licenses; [ unlicense ];
93     maintainers = with maintainers; [ soispha ];
94   };