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
|
|
|
, pytestCheckHook
|
2023-05-24 13:37:59 +00:00
|
|
|
, pythonOlder
|
2021-05-20 23:08:51 +00:00
|
|
|
, mock
|
|
|
|
, pyhamcrest
|
|
|
|
, radish-bdd
|
2021-02-05 17:12:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gremlinpython";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "3.6.4";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "apache";
|
|
|
|
repo = "tinkerpop";
|
2023-05-24 13:37:59 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-SQ+LcHeHDB1Hd5wXGDJBZmBG4KEZ3NsV4+4X9WgPb9E=";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
2022-11-21 17:40:18 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
sourceRoot = "${src.name}/gremlin-python/src/main/python";
|
2022-11-21 17:40:18 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
postPatch = ''
|
2022-11-21 17:40:18 +00:00
|
|
|
sed -i '/pytest-runner/d' setup.py
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
substituteInPlace setup.py \
|
2023-03-30 22:05:00 +00:00
|
|
|
--replace 'importlib-metadata<5.0.0' 'importlib-metadata' \
|
|
|
|
--replace "os.getenv('VERSION', '?').replace('-SNAPSHOT', '.dev-%d' % timestamp)" '"${version}"'
|
2021-02-05 17:12:51 +00:00
|
|
|
'';
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
# setup-requires requirements
|
|
|
|
nativeBuildInputs = [
|
|
|
|
importlib-metadata
|
|
|
|
];
|
2023-01-20 10:41:00 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
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
|
|
|
];
|
2021-02-05 17:12:51 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-05-20 23:08:51 +00:00
|
|
|
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;
|
2023-08-22 20:05:09 +00:00
|
|
|
maintainers = with maintainers; [ ris ];
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
}
|