about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pyarrow/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pyarrow/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/pyarrow/default.nix48
1 files changed, 16 insertions, 32 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pyarrow/default.nix b/nixpkgs/pkgs/development/python-modules/pyarrow/default.nix
index ab05f49ac38f..e24ca0fa78e6 100644
--- a/nixpkgs/pkgs/development/python-modules/pyarrow/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/pyarrow/default.nix
@@ -1,4 +1,4 @@
-{ lib, buildPythonPackage, python, isPy3k, arrow-cpp, cmake, cython, futures, hypothesis, numpy, pandas, pytest, pytest-lazy-fixture, pkgconfig, setuptools_scm, six }:
+{ lib, fetchpatch, buildPythonPackage, python, isPy3k, arrow-cpp, cmake, cython, futures, hypothesis, numpy, pandas, pytestCheckHook, pytest-lazy-fixture, pkgconfig, setuptools_scm, six }:
 
 let
   _arrow-cpp = arrow-cpp.override { inherit python; };
@@ -9,11 +9,21 @@ buildPythonPackage rec {
 
   inherit (_arrow-cpp) version src;
 
+  patches = [
+    # Remove when updating pkgs.arrow-cpp to 0.17
+    (fetchpatch {
+      name = "ARROW-8106-fix-conversion-test";
+      url = "https://github.com/apache/arrow/commit/af20bbff30adc560d7e57dd921345d00cc8b870c.patch";
+      sha256 = "0ihpw589vh35va31ajzy5zpx3bqd9gdn3342rghi03r245kch9zd";
+      stripLen = 1;
+    })
+  ];
+
   sourceRoot = "apache-arrow-${version}/python";
 
   nativeBuildInputs = [ cmake cython pkgconfig setuptools_scm ];
   propagatedBuildInputs = [ numpy six ] ++ lib.optionals (!isPy3k) [ futures ];
-  checkInputs = [ hypothesis pandas pytest pytest-lazy-fixture ];
+  checkInputs = [ hypothesis pandas pytestCheckHook pytest-lazy-fixture ];
 
   PYARROW_BUILD_TYPE = "release";
   PYARROW_WITH_PARQUET = true;
@@ -24,6 +34,8 @@ buildPythonPackage rec {
     # ourselves
     "-DCMAKE_POLICY_DEFAULT_CMP0025=NEW"
   ];
+  ARROW_HOME = _arrow-cpp;
+  PARQUET_HOME = _arrow-cpp;
 
   dontUseCmakeConfigure = true;
 
@@ -31,45 +43,17 @@ buildPythonPackage rec {
     export PYARROW_PARALLEL=$NIX_BUILD_CORES
   '';
 
+  dontUseSetuptoolsCheck = true;
   preCheck = ''
-    rm pyarrow/tests/test_jvm.py
-    rm pyarrow/tests/test_hdfs.py
-    rm pyarrow/tests/test_cuda.py
-
-    # fails: "ArrowNotImplementedError: Unsupported numpy type 22"
-    substituteInPlace pyarrow/tests/test_feather.py --replace "test_timedelta_with_nulls" "_disabled"
-
-    # runs out of memory on @grahamcofborg linux box
-    substituteInPlace pyarrow/tests/test_feather.py --replace "test_large_dataframe" "_disabled"
-
-    # probably broken on python2
-    substituteInPlace pyarrow/tests/test_feather.py --replace "test_unicode_filename" "_disabled"
-
-    # fails "error: [Errno 2] No such file or directory: 'test'" because
-    # nix_run_setup invocation somehow manages to import deserialize_buffer.py
-    # when it is not intended to be imported at all
-    rm pyarrow/tests/deserialize_buffer.py
-    substituteInPlace pyarrow/tests/test_feather.py --replace "test_deserialize_buffer_in_different_process" "_disabled"
-
-    # Fails to bind a socket
-    # "PermissionError: [Errno 1] Operation not permitted"
-    substituteInPlace pyarrow/tests/test_ipc.py --replace "test_socket_" "_disabled"
-  '';
-
-  ARROW_HOME = _arrow-cpp;
-  PARQUET_HOME = _arrow-cpp;
-
-  checkPhase = ''
     mv pyarrow/tests tests
     rm -rf pyarrow
     mkdir pyarrow
     mv tests pyarrow/tests
-    pytest -v
   '';
 
   meta = with lib; {
     description = "A cross-language development platform for in-memory data";
-    homepage = https://arrow.apache.org/;
+    homepage = "https://arrow.apache.org/";
     license = lib.licenses.asl20;
     platforms = platforms.unix;
     maintainers = with lib.maintainers; [ veprbl ];