nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 77 lines 1.8 kB view raw
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.0"; 19 20 # pypi tarball doesn't include tests 21 src = fetchFromGitHub { 22 owner = "apache"; 23 repo = "tinkerpop"; 24 rev = version; 25 sha256 = "0gyf3a0zbh1grc1vr9zzpqm5yfcjvn0f1akw9l1arq36isqwvydn"; 26 }; 27 sourceRoot = "source/gremlin-python/src/main/python"; 28 postPatch = '' 29 substituteInPlace setup.py \ 30 --replace 'pytest-runner==5.2' ' ' 31 ''; 32 33 # setup-requires requirements 34 nativeBuildInputs = [ 35 importlib-metadata 36 ]; 37 propagatedBuildInputs = [ 38 aenum 39 aiohttp 40 isodate 41 nest-asyncio 42 six 43 ]; 44 45 checkInputs = [ 46 pytestCheckHook 47 mock 48 pyhamcrest 49 radish-bdd 50 ]; 51 52 # disable custom pytest report generation 53 preCheck = '' 54 substituteInPlace setup.cfg --replace 'addopts' '#addopts' 55 export TEST_TRANSACTIONS='false' 56 ''; 57 58 # many tests expect a running tinkerpop server 59 disabledTestPaths = [ 60 "tests/driver/test_client.py" 61 "tests/driver/test_driver_remote_connection.py" 62 "tests/driver/test_driver_remote_connection_threaded.py" 63 "tests/process/test_dsl.py" 64 "tests/structure/io/test_functionalityio.py" 65 ]; 66 pytestFlagsArray = [ 67 # disabledTests doesn't quite allow us to be precise enough for this 68 "-k 'not (TestFunctionalGraphSONIO and (test_timestamp or test_datetime or test_uuid))'" 69 ]; 70 71 meta = with lib; { 72 description = "Gremlin-Python implements Gremlin, the graph traversal language of Apache TinkerPop, within the Python language"; 73 homepage = "https://tinkerpop.apache.org/"; 74 license = licenses.asl20; 75 maintainers = with maintainers; [ turion ris ]; 76 }; 77}