python.pkgs.pyarrow: fix for python3
This commit is contained in:
parent
cdf612bc0d
commit
671e9bd3bf
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, symlinkJoin, fetchurl, boost, brotli, cmake, flatbuffers, gtest, gflags, lz4, pythonPackages, rapidjson, snappy, zlib, zstd }:
|
{ stdenv, symlinkJoin, fetchurl, boost, brotli, cmake, flatbuffers, gtest, gflags, lz4, python, rapidjson, snappy, zlib, zstd }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "arrow-cpp-${version}";
|
name = "arrow-cpp-${version}";
|
||||||
@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
|
|||||||
sourceRoot = "apache-arrow-${version}/cpp";
|
sourceRoot = "apache-arrow-${version}/cpp";
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
buildInputs = [ boost pythonPackages.python pythonPackages.numpy ];
|
buildInputs = [ boost python.pkgs.python python.pkgs.numpy ];
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
substituteInPlace cmake_modules/FindBrotli.cmake --replace CMAKE_STATIC_LIBRARY CMAKE_SHARED_LIBRARY
|
substituteInPlace cmake_modules/FindBrotli.cmake --replace CMAKE_STATIC_LIBRARY CMAKE_SHARED_LIBRARY
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
{ lib, buildPythonPackage, fetchurl, arrow-cpp, cmake, cython, futures, numpy, pandas, pytest, pytestrunner, parquet-cpp, pkgconfig, setuptools_scm, six }:
|
{ lib, buildPythonPackage, python, isPy3k, fetchurl, arrow-cpp, cmake, cython, futures, numpy, pandas, pytest, pytestrunner, parquet-cpp, pkgconfig, setuptools_scm, six }:
|
||||||
|
|
||||||
|
let
|
||||||
|
_arrow-cpp = arrow-cpp.override { inherit python;};
|
||||||
|
_parquet-cpp = parquet-cpp.override { arrow-cpp = _arrow-cpp; };
|
||||||
|
in
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pyarrow";
|
pname = "pyarrow";
|
||||||
@ -12,7 +17,7 @@ buildPythonPackage rec {
|
|||||||
sourceRoot = "apache-arrow-${version}/python";
|
sourceRoot = "apache-arrow-${version}/python";
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake cython pkgconfig setuptools_scm ];
|
nativeBuildInputs = [ cmake cython pkgconfig setuptools_scm ];
|
||||||
propagatedBuildInputs = [ futures numpy six ];
|
propagatedBuildInputs = [ numpy six ] ++ lib.optionals (!isPy3k) [ futures ];
|
||||||
checkInputs = [ pandas pytest pytestrunner ];
|
checkInputs = [ pandas pytest pytestrunner ];
|
||||||
|
|
||||||
PYARROW_BUILD_TYPE = "release";
|
PYARROW_BUILD_TYPE = "release";
|
||||||
@ -23,7 +28,7 @@ buildPythonPackage rec {
|
|||||||
substituteInPlace CMakeLists.txt --replace "\''${ARROW_SO_VERSION}" '"0"'
|
substituteInPlace CMakeLists.txt --replace "\''${ARROW_SO_VERSION}" '"0"'
|
||||||
|
|
||||||
# fix the hardcoded value
|
# fix the hardcoded value
|
||||||
substituteInPlace cmake_modules/FindParquet.cmake --replace 'set(PARQUET_ABI_VERSION "1.0.0")' 'set(PARQUET_ABI_VERSION "${parquet-cpp.version}")'
|
substituteInPlace cmake_modules/FindParquet.cmake --replace 'set(PARQUET_ABI_VERSION "1.0.0")' 'set(PARQUET_ABI_VERSION "${_parquet-cpp.version}")'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
@ -45,8 +50,8 @@ buildPythonPackage rec {
|
|||||||
substituteInPlace pyarrow/tests/test_feather.py --replace "test_deserialize_buffer_in_different_process" "_disabled"
|
substituteInPlace pyarrow/tests/test_feather.py --replace "test_deserialize_buffer_in_different_process" "_disabled"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ARROW_HOME = arrow-cpp;
|
ARROW_HOME = _arrow-cpp;
|
||||||
PARQUET_HOME = parquet-cpp;
|
PARQUET_HOME = _parquet-cpp;
|
||||||
|
|
||||||
setupPyBuildFlags = ["--with-parquet" ];
|
setupPyBuildFlags = ["--with-parquet" ];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user