1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, aenum 5, aiohttp 6, importlib-metadata 7, isodate 8, nest-asyncio 9, six 10, pytestCheckHook 11, mock 12, pyhamcrest 13, radish-bdd 14}: 15 16buildPythonPackage rec { 17 pname = "gremlinpython"; 18 version = "3.6.1"; 19 20 # pypi tarball doesn't include tests 21 src = fetchFromGitHub { 22 owner = "apache"; 23 repo = "tinkerpop"; 24 rev = version; 25 sha256 = "sha256-FMA9hJdq7gYkDtQO04Bwpjq2Q7nXGuN9wrBD4b9GgwY="; 26 }; 27 28 sourceRoot = "source/gremlin-python/src/main/python"; 29 30 postPatch = '' 31 sed -i '/pytest-runner/d' setup.py 32 33 substituteInPlace setup.py \ 34 --replace 'aiohttp>=3.8.0,<=3.8.1' 'aiohttp' 35 ''; 36 37 # setup-requires requirements 38 nativeBuildInputs = [ 39 importlib-metadata 40 ]; 41 propagatedBuildInputs = [ 42 aenum 43 aiohttp 44 isodate 45 nest-asyncio 46 six 47 ]; 48 49 checkInputs = [ 50 pytestCheckHook 51 mock 52 pyhamcrest 53 radish-bdd 54 ]; 55 56 # disable custom pytest report generation 57 preCheck = '' 58 substituteInPlace setup.cfg --replace 'addopts' '#addopts' 59 export TEST_TRANSACTIONS='false' 60 ''; 61 62 # many tests expect a running tinkerpop server 63 disabledTestPaths = [ 64 "tests/driver/test_client.py" 65 "tests/driver/test_driver_remote_connection.py" 66 "tests/driver/test_driver_remote_connection_threaded.py" 67 "tests/process/test_dsl.py" 68 "tests/structure/io/test_functionalityio.py" 69 ]; 70 pytestFlagsArray = [ 71 # disabledTests doesn't quite allow us to be precise enough for this 72 "-k 'not (TestFunctionalGraphSONIO and (test_timestamp or test_datetime or test_uuid))'" 73 ]; 74 75 meta = with lib; { 76 description = "Gremlin-Python implements Gremlin, the graph traversal language of Apache TinkerPop, within the Python language"; 77 homepage = "https://tinkerpop.apache.org/"; 78 license = licenses.asl20; 79 maintainers = with maintainers; [ turion ris ]; 80 }; 81}