2021-12-21 02:18:32 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2024-01-25 14:12:00 +00:00
|
|
|
, numpy
|
|
|
|
, pandas
|
|
|
|
, pyarrow
|
2021-12-21 02:18:32 +00:00
|
|
|
, pythonOlder
|
|
|
|
, pytz
|
2024-01-25 14:12:00 +00:00
|
|
|
, setuptools
|
2022-12-02 08:20:57 +00:00
|
|
|
, tomlkit
|
2021-12-21 02:18:32 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2022-06-16 17:23:12 +00:00
|
|
|
pname = "neo4j";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "5.19.0";
|
2024-01-25 14:12:00 +00:00
|
|
|
pyproject = true;
|
2021-12-21 02:18:32 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "neo4j";
|
|
|
|
repo = "neo4j-python-driver";
|
2022-09-11 15:47:08 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-bI6LIzh2+Kf6IIWEt1vT0E821lAPy/Nj2hkeAnRfV4M=";
|
2021-12-21 02:18:32 +00:00
|
|
|
};
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
postPatch = ''
|
|
|
|
# The dynamic versioning adds a postfix (.dev0) to the version
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-04-21 15:54:59 +00:00
|
|
|
--replace-fail '"tomlkit ~= 0.11.6"' '"tomlkit >= 0.11.6"' \
|
|
|
|
--replace-fail 'dynamic = ["version", "readme"]' 'dynamic = ["readme"]' \
|
|
|
|
--replace-fail '#readme = "README.rst"' 'version = "${version}"'
|
2024-01-25 14:12:00 +00:00
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [
|
2024-01-25 14:12:00 +00:00
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2021-12-21 02:18:32 +00:00
|
|
|
pytz
|
2022-12-02 08:20:57 +00:00
|
|
|
tomlkit
|
2021-12-21 02:18:32 +00:00
|
|
|
];
|
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
numpy = [
|
|
|
|
numpy
|
|
|
|
];
|
|
|
|
pandas = [
|
|
|
|
numpy
|
|
|
|
pandas
|
|
|
|
];
|
|
|
|
pyarrow = [
|
|
|
|
pyarrow
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2021-12-21 02:18:32 +00:00
|
|
|
# Missing dependencies
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"neo4j"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Neo4j Bolt Driver for Python";
|
|
|
|
homepage = "https://github.com/neo4j/neo4j-python-driver";
|
2022-12-02 08:20:57 +00:00
|
|
|
changelog = "https://github.com/neo4j/neo4j-python-driver/releases/tag/${version}";
|
2021-12-21 02:18:32 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|