2021-12-26 17:43:05 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, sqlite
|
|
|
|
, isPyPy
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "apsw";
|
2021-12-26 17:43:05 +00:00
|
|
|
version = "3.36.0-r1";
|
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
disabled = isPyPy;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rogerbinns";
|
|
|
|
repo = "apsw";
|
|
|
|
rev = version;
|
2021-12-26 17:43:05 +00:00
|
|
|
sha256 = "sha256-kQqJqDikvEC0+PNhQxSNTcjQc+RwvaOSGz9VL3FCetg=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
buildInputs = [
|
|
|
|
sqlite
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
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"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A Python wrapper for the SQLite embedded relational database engine";
|
|
|
|
homepage = "https://github.com/rogerbinns/apsw";
|
|
|
|
license = licenses.zlib;
|
2021-12-26 17:43:05 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|