2021-05-20 23:08:51 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, aenum
|
2021-08-10 14:31:46 +00:00
|
|
|
, aiohttp
|
2021-05-20 23:08:51 +00:00
|
|
|
, importlib-metadata
|
|
|
|
, isodate
|
2021-08-10 14:31:46 +00:00
|
|
|
, nest-asyncio
|
2021-05-20 23:08:51 +00:00
|
|
|
, six
|
|
|
|
, pytestCheckHook
|
|
|
|
, mock
|
|
|
|
, pyhamcrest
|
|
|
|
, radish-bdd
|
2021-02-05 17:12:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gremlinpython";
|
2022-04-15 01:41:22 +00:00
|
|
|
version = "3.6.0";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
# pypi tarball doesn't include tests
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "apache";
|
|
|
|
repo = "tinkerpop";
|
|
|
|
rev = version;
|
2022-04-15 01:41:22 +00:00
|
|
|
sha256 = "0gyf3a0zbh1grc1vr9zzpqm5yfcjvn0f1akw9l1arq36isqwvydn";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
2021-08-10 14:31:46 +00:00
|
|
|
sourceRoot = "source/gremlin-python/src/main/python";
|
2021-02-05 17:12:51 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2021-05-20 23:08:51 +00:00
|
|
|
--replace 'pytest-runner==5.2' ' '
|
2021-02-05 17:12:51 +00:00
|
|
|
'';
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
# setup-requires requirements
|
|
|
|
nativeBuildInputs = [
|
|
|
|
importlib-metadata
|
|
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aenum
|
2021-08-10 14:31:46 +00:00
|
|
|
aiohttp
|
2021-05-20 23:08:51 +00:00
|
|
|
isodate
|
2021-08-10 14:31:46 +00:00
|
|
|
nest-asyncio
|
2021-05-20 23:08:51 +00:00
|
|
|
six
|
|
|
|
];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
mock
|
|
|
|
pyhamcrest
|
|
|
|
radish-bdd
|
|
|
|
];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
# disable custom pytest report generation
|
|
|
|
preCheck = ''
|
|
|
|
substituteInPlace setup.cfg --replace 'addopts' '#addopts'
|
2022-04-15 01:41:22 +00:00
|
|
|
export TEST_TRANSACTIONS='false'
|
2021-02-05 17:12:51 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
# many tests expect a running tinkerpop server
|
2021-05-20 23:08:51 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
"tests/driver/test_client.py"
|
|
|
|
"tests/driver/test_driver_remote_connection.py"
|
|
|
|
"tests/driver/test_driver_remote_connection_threaded.py"
|
|
|
|
"tests/process/test_dsl.py"
|
|
|
|
"tests/structure/io/test_functionalityio.py"
|
|
|
|
];
|
2021-02-05 17:12:51 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
# disabledTests doesn't quite allow us to be precise enough for this
|
|
|
|
"-k 'not (TestFunctionalGraphSONIO and (test_timestamp or test_datetime or test_uuid))'"
|
|
|
|
];
|
|
|
|
|
|
|
|
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;
|
|
|
|
maintainers = with maintainers; [ turion ris ];
|
|
|
|
};
|
|
|
|
}
|