2021-05-03 15:10:36 -04:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
aenum,
|
2021-08-08 22:15:05 +01:00
|
|
|
aiohttp,
|
2021-05-03 15:10:36 -04:00
|
|
|
importlib-metadata,
|
|
|
|
isodate,
|
2021-08-08 22:15:05 +01:00
|
|
|
nest-asyncio,
|
2021-05-03 15:10:36 -04:00
|
|
|
pytestCheckHook,
|
2023-05-13 22:15:13 +02:00
|
|
|
pythonOlder,
|
2021-05-03 15:10:36 -04:00
|
|
|
mock,
|
|
|
|
pyhamcrest,
|
2024-04-14 18:43:22 +01:00
|
|
|
pyyaml,
|
2021-05-03 15:10:36 -04:00
|
|
|
radish-bdd,
|
2020-10-18 01:36:15 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gremlinpython";
|
2024-11-03 18:30:00 +00:00
|
|
|
version = "3.7.3";
|
2023-05-13 22:15:13 +02:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-10-18 01:36:15 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "apache";
|
|
|
|
repo = "tinkerpop";
|
2025-01-03 21:24:13 +01:00
|
|
|
tag = version;
|
2024-11-03 18:30:00 +00:00
|
|
|
hash = "sha256-Yc0l3kE+6dM9v4QUZPFpm/yjDCrqVO35Vy5srEjAExE=";
|
2020-10-18 01:36:15 +01:00
|
|
|
};
|
2022-11-11 02:50:57 +01:00
|
|
|
|
2023-07-25 13:27:31 +00:00
|
|
|
sourceRoot = "${src.name}/gremlin-python/src/main/python";
|
2022-11-11 02:50:57 +01:00
|
|
|
|
2020-10-18 01:36:15 +01:00
|
|
|
postPatch = ''
|
2022-11-11 02:50:57 +01:00
|
|
|
sed -i '/pytest-runner/d' setup.py
|
|
|
|
|
2020-10-18 01:36:15 +01:00
|
|
|
substituteInPlace setup.py \
|
2023-03-29 15:14:33 -07:00
|
|
|
--replace 'importlib-metadata<5.0.0' 'importlib-metadata' \
|
|
|
|
--replace "os.getenv('VERSION', '?').replace('-SNAPSHOT', '.dev-%d' % timestamp)" '"${version}"'
|
2020-10-18 01:36:15 +01:00
|
|
|
'';
|
|
|
|
|
2021-05-03 15:10:36 -04:00
|
|
|
# setup-requires requirements
|
|
|
|
nativeBuildInputs = [ importlib-metadata ];
|
2023-01-04 02:48:02 +01:00
|
|
|
|
2021-05-03 15:10:36 -04:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aenum
|
2021-08-08 22:15:05 +01:00
|
|
|
aiohttp
|
2021-05-03 15:10:36 -04:00
|
|
|
isodate
|
2021-08-08 22:15:05 +01:00
|
|
|
nest-asyncio
|
2021-05-03 15:10:36 -04:00
|
|
|
];
|
2020-10-18 01:36:15 +01:00
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2021-05-03 15:10:36 -04:00
|
|
|
pytestCheckHook
|
|
|
|
mock
|
|
|
|
pyhamcrest
|
2024-04-14 18:43:22 +01:00
|
|
|
pyyaml
|
2021-05-03 15:10:36 -04:00
|
|
|
radish-bdd
|
|
|
|
];
|
2020-10-18 01:36:15 +01:00
|
|
|
|
|
|
|
# disable custom pytest report generation
|
|
|
|
preCheck = ''
|
|
|
|
substituteInPlace setup.cfg --replace 'addopts' '#addopts'
|
2022-04-09 17:30:00 +01:00
|
|
|
export TEST_TRANSACTIONS='false'
|
2020-10-18 01:36:15 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
# many tests expect a running tinkerpop server
|
2021-05-03 15:10:36 -04:00
|
|
|
disabledTestPaths = [
|
|
|
|
"tests/driver/test_client.py"
|
|
|
|
"tests/driver/test_driver_remote_connection.py"
|
2024-04-14 18:43:22 +01:00
|
|
|
"tests/driver/test_driver_remote_connection_http.py"
|
2021-05-03 15:10:36 -04:00
|
|
|
"tests/driver/test_driver_remote_connection_threaded.py"
|
2024-04-14 18:43:22 +01:00
|
|
|
"tests/driver/test_web_socket_client_behavior.py"
|
2021-05-03 15:10:36 -04:00
|
|
|
"tests/process/test_dsl.py"
|
|
|
|
"tests/structure/io/test_functionalityio.py"
|
|
|
|
];
|
2024-04-14 18:43:22 +01:00
|
|
|
pytestFlagsArray =
|
|
|
|
let
|
|
|
|
fullDisabled = builtins.concatStringsSep " or " [
|
|
|
|
"test_transaction_commit"
|
|
|
|
"test_transaction_rollback"
|
|
|
|
"test_transaction_no_begin"
|
|
|
|
"test_multi_commit_transaction"
|
|
|
|
"test_multi_rollback_transaction"
|
|
|
|
"test_multi_commit_and_rollback"
|
|
|
|
"test_transaction_close_tx"
|
|
|
|
"test_transaction_close_tx_from_parent"
|
2024-05-22 16:01:06 +02:00
|
|
|
];
|
|
|
|
in
|
|
|
|
[
|
2020-10-18 01:36:15 +01:00
|
|
|
# disabledTests doesn't quite allow us to be precise enough for this
|
2024-04-14 18:43:22 +01:00
|
|
|
"-k 'not ((TestFunctionalGraphSONIO and (test_timestamp or test_datetime or test_uuid)) or ${fullDisabled})'"
|
|
|
|
];
|
2020-10-18 01:36:15 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Gremlin-Python implements Gremlin, the graph traversal language of Apache TinkerPop, within the Python language";
|
|
|
|
homepage = "https://tinkerpop.apache.org/";
|
|
|
|
license = licenses.asl20;
|
2023-08-17 17:20:18 +02:00
|
|
|
maintainers = with maintainers; [ ris ];
|
2020-10-18 01:36:15 +01:00
|
|
|
};
|
|
|
|
}
|