1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
pg8000,
psycopg,
pytest-asyncio,
pytest-postgresql,
pytestCheckHook,
pythonOlder,
setuptools,
setuptools-scm,
sphinx-rtd-theme,
sphinxHook,
}:
buildPythonPackage rec {
pname = "aiosql";
version = "15.0";
pyproject = true;
outputs = [
"out"
"doc"
];
src = fetchFromGitHub {
owner = "nackjicholson";
repo = "aiosql";
tag = version;
hash = "sha256-zKKp37tM0pBnWJuLmQhoQpWnUinLG/Nmnpv1rdM8wYM=";
};
sphinxRoot = "docs/source";
nativeBuildInputs = [
setuptools
setuptools-scm
sphinx-rtd-theme
sphinxHook
];
nativeCheckInputs = [
pg8000
psycopg
pytest-asyncio
pytest-postgresql
pytestCheckHook
];
pythonImportsCheck = [ "aiosql" ];
disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [
# Tests that require port binding fail in darwin sandbox
# port_for.exceptions.PortForException: Can't select a port
"tests/test_pg8000.py"
"tests/test_apsycopg3.py"
"tests/test_psycopg3.py"
];
meta = {
description = "Simple SQL in Python";
homepage = "https://nackjicholson.github.io/aiosql/";
changelog = "https://github.com/nackjicholson/aiosql/releases/tag/${src.tag}";
license = with lib.licenses; [ bsd2 ];
maintainers = with lib.maintainers; [ kaction ];
};
}
|