about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pyarrow
diff options
context:
space:
mode:
authorDmitry Kalinkin <dmitry.kalinkin@gmail.com>2018-10-25 22:18:18 -0400
committerDmitry Kalinkin <dmitry.kalinkin@gmail.com>2018-10-25 23:12:16 -0400
commit6ae3cb4d36079d4738c656c4bef6615ba3f064a1 (patch)
treec382e30a5aacea56bfff33c663d8fe3e8ce2f6c2 /pkgs/development/python-modules/pyarrow
parent2337c7522af3b186d4d7ecefe9e19c33aafc6626 (diff)
downloadnixlib-6ae3cb4d36079d4738c656c4bef6615ba3f064a1.tar
nixlib-6ae3cb4d36079d4738c656c4bef6615ba3f064a1.tar.gz
nixlib-6ae3cb4d36079d4738c656c4bef6615ba3f064a1.tar.bz2
nixlib-6ae3cb4d36079d4738c656c4bef6615ba3f064a1.tar.lz
nixlib-6ae3cb4d36079d4738c656c4bef6615ba3f064a1.tar.xz
nixlib-6ae3cb4d36079d4738c656c4bef6615ba3f064a1.tar.zst
nixlib-6ae3cb4d36079d4738c656c4bef6615ba3f064a1.zip
pythonPackages.pyarrow: fix running tests on hydra
This replaces standard checkPhase using setup.py that uses pytest-runner
with an explicit call to pytest. One reason to do that is because
setup.py triggers another rebuild when asked to do "test". Another
reason is that there seems to be a conflict between possible imports for
pyarrow: `pwd`/pyarrow vs $out/pyarrow. By some unknown reason this
triggers an import error on hydra and ofborg, but not on my machine. The
solution here is to remove `pwd`/pyarrow, keep the tests and use direct
call to pytest (setup.py needs `pwd`/pyarrow). The added benefit is that
we are now testing what is installed in $out.
Diffstat (limited to 'pkgs/development/python-modules/pyarrow')
-rw-r--r--pkgs/development/python-modules/pyarrow/default.nix12
1 files changed, 10 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/pyarrow/default.nix b/pkgs/development/python-modules/pyarrow/default.nix
index 8ebb88fa6a73..981576e13ed0 100644
--- a/pkgs/development/python-modules/pyarrow/default.nix
+++ b/pkgs/development/python-modules/pyarrow/default.nix
@@ -1,4 +1,4 @@
-{ lib, buildPythonPackage, python, isPy3k, fetchurl, arrow-cpp, cmake, cython, futures, JPype1, numpy, pandas, pytest, pytestrunner, pkgconfig, setuptools_scm, six }:
+{ lib, buildPythonPackage, python, isPy3k, fetchurl, arrow-cpp, cmake, cython, futures, JPype1, numpy, pandas, pytest, pkgconfig, setuptools_scm, six }:
 
 let
   _arrow-cpp = arrow-cpp.override { inherit python; };
@@ -13,7 +13,7 @@ buildPythonPackage rec {
 
   nativeBuildInputs = [ cmake cython pkgconfig setuptools_scm ];
   propagatedBuildInputs = [ numpy six ] ++ lib.optionals (!isPy3k) [ futures ];
-  checkInputs = [ pandas pytest pytestrunner JPype1 ];
+  checkInputs = [ pandas pytest JPype1 ];
 
   PYARROW_BUILD_TYPE = "release";
   PYARROW_CMAKE_OPTIONS = "-DCMAKE_INSTALL_RPATH=${ARROW_HOME}/lib";
@@ -43,6 +43,14 @@ buildPythonPackage rec {
 
   setupPyBuildFlags = ["--with-parquet" ];
 
+  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/;