summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobert Scott <code@humanleg.org.uk>2020-10-18 01:36:15 +0100
committerRobert Scott <code@humanleg.org.uk>2021-01-30 13:41:36 +0000
commit14b0dfd2fc09ccf1f3d786764a2d19a60df47d2c (patch)
tree761d16ec4b2efe2f63be522018348932124941ae
parent9bd221d833cf19acae88a2bb4ab0565d57aad8be (diff)
downloadnixpkgs-14b0dfd2fc09ccf1f3d786764a2d19a60df47d2c.tar
nixpkgs-14b0dfd2fc09ccf1f3d786764a2d19a60df47d2c.tar.gz
nixpkgs-14b0dfd2fc09ccf1f3d786764a2d19a60df47d2c.tar.bz2
nixpkgs-14b0dfd2fc09ccf1f3d786764a2d19a60df47d2c.tar.lz
nixpkgs-14b0dfd2fc09ccf1f3d786764a2d19a60df47d2c.tar.xz
nixpkgs-14b0dfd2fc09ccf1f3d786764a2d19a60df47d2c.tar.zst
nixpkgs-14b0dfd2fc09ccf1f3d786764a2d19a60df47d2c.zip
python3Packages.gremlinpython: init at 3.4.8
-rw-r--r--pkgs/development/python-modules/gremlinpython/default.nix54
-rw-r--r--pkgs/top-level/python-packages.nix2
2 files changed, 56 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/gremlinpython/default.nix b/pkgs/development/python-modules/gremlinpython/default.nix
new file mode 100644
index 00000000000..97d169283b2
--- /dev/null
+++ b/pkgs/development/python-modules/gremlinpython/default.nix
@@ -0,0 +1,54 @@
+{ stdenv, lib, buildPythonPackage, fetchFromGitHub, python, pythonOlder
+, pytestCheckHook, pyhamcrest, pytestrunner, pytest
+, six, isodate, tornado, aenum, radish-bdd, mock
+}:
+
+buildPythonPackage rec {
+  pname = "gremlinpython";
+  version = "3.4.8";
+
+  # pypi tarball doesn't include tests
+  src = fetchFromGitHub {
+    owner = "apache";
+    repo = "tinkerpop";
+    rev = version;
+    sha256 = "0kcyhfxz7z4f8i64gig8q1q9dhy24cprbh63vwsdiwryg74q4chl";
+  };
+  sourceRoot = "source/gremlin-python/src/main/jython";
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace 'tornado>=4.4.1,<6.0' 'tornado' \
+      --replace 'PyHamcrest>=1.9.0,<2.0.0' 'PyHamcrest' \
+      --replace 'radish-bdd==0.8.6' 'radish-bdd' \
+      --replace 'mock>=3.0.5,<4.0.0' 'mock' \
+      --replace 'pytest>=4.6.4,<5.0.0' 'pytest'
+  '';
+
+  nativeBuildInputs = [ pytestrunner ];  # simply to placate requirements
+  propagatedBuildInputs = [ six isodate tornado aenum ];
+
+  checkInputs = [ pytestCheckHook pyhamcrest radish-bdd mock ];
+
+  # disable custom pytest report generation
+  preCheck = ''
+    substituteInPlace setup.cfg --replace 'addopts' '#addopts'
+  '';
+
+  # many tests expect a running tinkerpop server
+  pytestFlagsArray = [
+    "--ignore=tests/driver/test_client.py"
+    "--ignore=tests/driver/test_driver_remote_connection.py"
+    "--ignore=tests/driver/test_driver_remote_connection_threaded.py"
+    "--ignore=tests/process/test_dsl.py"
+    "--ignore=tests/structure/io/test_functionalityio.py"
+    # 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 ];
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index d30d91485dc..3d584fac214 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -2787,6 +2787,8 @@ in {
 
   grequests = callPackage ../development/python-modules/grequests { };
 
+  gremlinpython = callPackage ../development/python-modules/gremlinpython { };
+
   grib-api = disabledIf (!isPy27) (toPythonModule (pkgs.grib-api.override {
     enablePython = true;
     pythonPackages = self;