blob: 5adee7244dd395cb405db35d44742e7fa7619962 (
plain) (
blame)
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
|
{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, sqlite
, isPyPy
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "apsw";
version = "3.37.0-r1";
format = "setuptools";
disabled = isPyPy;
src = fetchFromGitHub {
owner = "rogerbinns";
repo = "apsw";
rev = version;
sha256 = "0p6rlbk7p6hj5mbmk1a8phazw3ym6hf5103zkxzg4p1jgjgi0xpl";
};
buildInputs = [
sqlite
];
checkInputs = [
pytestCheckHook
];
# Works around the following error by dropping the call to that function
# def print_version_info(write=write):
# > write(" Python " + sys.executable + " " + str(sys.version_info) + "\n")
# E TypeError: 'module' object is not callable
preCheck = ''
sed -i '/print_version_info(write)/d' tests.py
'';
pytestFlagsArray = [
"tests.py"
];
disabledTests = [
"testCursor"
"testLoadExtension"
"testShell"
"testVFS"
"testVFSWithWAL"
"testdb"
] ++ lib.optionals stdenv.isDarwin [
# This is https://github.com/rogerbinns/apsw/issues/277 but
# because we use pytestCheckHook we need to blacklist the test
# manually
"testzzForkChecker"
];
pythonImportsCheck = [
"apsw"
];
meta = with lib; {
description = "A Python wrapper for the SQLite embedded relational database engine";
homepage = "https://github.com/rogerbinns/apsw";
license = licenses.zlib;
maintainers = with maintainers; [ ];
};
}
|