18 buildPythonPackage rec {
19 pname = "gremlinpython";
21 format = "setuptools";
23 disabled = pythonOlder "3.7";
25 src = fetchFromGitHub {
28 rev = "refs/tags/${version}";
29 hash = "sha256-Yc0l3kE+6dM9v4QUZPFpm/yjDCrqVO35Vy5srEjAExE=";
32 sourceRoot = "${src.name}/gremlin-python/src/main/python";
35 sed -i '/pytest-runner/d' setup.py
37 substituteInPlace setup.py \
38 --replace 'importlib-metadata<5.0.0' 'importlib-metadata' \
39 --replace "os.getenv('VERSION', '?').replace('-SNAPSHOT', '.dev-%d' % timestamp)" '"${version}"'
42 # setup-requires requirements
43 nativeBuildInputs = [ importlib-metadata ];
45 propagatedBuildInputs = [
60 # disable custom pytest report generation
62 substituteInPlace setup.cfg --replace 'addopts' '#addopts'
63 export TEST_TRANSACTIONS='false'
66 # many tests expect a running tinkerpop server
68 "tests/driver/test_client.py"
69 "tests/driver/test_driver_remote_connection.py"
70 "tests/driver/test_driver_remote_connection_http.py"
71 "tests/driver/test_driver_remote_connection_threaded.py"
72 "tests/driver/test_web_socket_client_behavior.py"
73 "tests/process/test_dsl.py"
74 "tests/structure/io/test_functionalityio.py"
78 fullDisabled = builtins.concatStringsSep " or " [
79 "test_transaction_commit"
80 "test_transaction_rollback"
81 "test_transaction_no_begin"
82 "test_multi_commit_transaction"
83 "test_multi_rollback_transaction"
84 "test_multi_commit_and_rollback"
85 "test_transaction_close_tx"
86 "test_transaction_close_tx_from_parent"
90 # disabledTests doesn't quite allow us to be precise enough for this
91 "-k 'not ((TestFunctionalGraphSONIO and (test_timestamp or test_datetime or test_uuid)) or ${fullDisabled})'"
95 description = "Gremlin-Python implements Gremlin, the graph traversal language of Apache TinkerPop, within the Python language";
96 homepage = "https://tinkerpop.apache.org/";
97 license = licenses.asl20;
98 maintainers = with maintainers; [ ris ];