2024-05-15 15:35:15 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
numpy,
|
|
|
|
pandas,
|
|
|
|
pyarrow,
|
|
|
|
pythonOlder,
|
|
|
|
pytz,
|
|
|
|
setuptools,
|
|
|
|
tomlkit,
|
2021-12-21 02:18:32 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2022-06-16 17:23:12 +00:00
|
|
|
pname = "neo4j";
|
2024-10-04 16:56:33 +00:00
|
|
|
version = "5.25.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-10-04 16:56:33 +00:00
|
|
|
hash = "sha256-aGUfyfN85JNOQSnnM+zep07cmLqq9YN1bc7UyH3uFWg=";
|
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-09-19 14:19:46 +00:00
|
|
|
--replace-fail "setuptools ==" "setuptools >=" \
|
|
|
|
--replace-fail "tomlkit ==" "tomlkit >=" \
|
2024-04-21 15:54:59 +00:00
|
|
|
--replace-fail 'dynamic = ["version", "readme"]' 'dynamic = ["readme"]' \
|
|
|
|
--replace-fail '#readme = "README.rst"' 'version = "${version}"'
|
2024-01-25 14:12:00 +00:00
|
|
|
'';
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
build-system = [ setuptools ];
|
2024-01-25 14:12:00 +00:00
|
|
|
|
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-10-04 16:56:33 +00:00
|
|
|
optional-dependencies = {
|
2024-05-15 15:35:15 +00:00
|
|
|
numpy = [ numpy ];
|
2024-01-25 14:12:00 +00:00
|
|
|
pandas = [
|
|
|
|
numpy
|
|
|
|
pandas
|
|
|
|
];
|
2024-05-15 15:35:15 +00:00
|
|
|
pyarrow = [ pyarrow ];
|
2024-01-25 14:12:00 +00:00
|
|
|
};
|
|
|
|
|
2021-12-21 02:18:32 +00:00
|
|
|
# Missing dependencies
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
pythonImportsCheck = [ "neo4j" ];
|
2021-12-21 02:18:32 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|