New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pyarrow #35589
Pyarrow #35589
Conversation
@@ -1,16 +1,21 @@ | |||
{ stdenv, lib, fetchFromGitHub, pkgconfig, cmake }: | |||
{ stdenv, lib, fetchFromGitHub, pkgconfig, cmake, fetchpatch }: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fetchpatch
isn't used
Author: Tom Hunger <tehunger@gmail.com> | ||
Date: Sun Feb 25 22:26:38 2018 +0000 | ||
|
||
bla |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please write something meaningful or leave it out.
nativeBuildInputs = [ pkgconfig ]; | ||
buildInputs = [ | ||
boost zlib libevent openssl python bison flex twisted | ||
boost zlib libevent openssl python bison flex twisted cmake |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cmake
belongs into nativeBuildInputs
}; | ||
in buildPythonPackage rec { | ||
# Loosely based on the instructions here: https://arrow.apache.org/docs/python/development.html | ||
name = "${pname}-${version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no name
@@ -17,7 +17,7 @@ stdenv.mkDerivation rec { | |||
|
|||
nativeBuildInputs = [ cmake ]; | |||
|
|||
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" "-DCMAKE_SKIP_BUILD_RPATH=OFF" ]; | |||
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" "-DCMAKE_SKIP_BUILD_RPATH=OFF" ] ++ (if withStatic then ["-DBUILD_SHARED_LIBS=OFF"] else []); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if withStatic
is a good name since if it's enabled, only static libraries seem to be built. However, I'm not sure what the effect is for other derivations using withStatic
.
nativeBuildInputs = [ cmake ]; | ||
buildInputs = [ | ||
cython | ||
setuptools_scm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably nativeBuildInputs
buildInputs = [ | ||
cython | ||
setuptools_scm | ||
pytest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checkInputs
meta = with stdenv.lib; { | ||
description = "Apache Arrow is a cross-language development platform for in-memory data."; | ||
homepage = "https://arrow.apache.org/"; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
license
?
checkPhase = '' | ||
# test requires gzip which hasn't been enabled yet: | ||
substituteInPlace pyarrow/tests/test_io.py --replace 'test_compress_decompress' '_test_disabled' | ||
substituteInPlace pyarrow/tests/test_parquet.py --replace 'test_pandas_parquet_configuration_options' '_test_disabled' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prePatch
(pkgs.thrift.override { withStatic = true; }) | ||
]; | ||
}; | ||
in buildPythonPackage rec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think all the above code would be more readable if it was indented by 2 spaces and if a blank line was inserted between different packages.
On a side note, why are these not provided in all-packages.nix
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any motivation for building static libraries.
mainly because its reliance on static libraries.
Where is that documented? Have you tried without?
Thanks for review @dotlambda - will address and comment here when done. @FRidh It's not documented explicitly - it's in their build files [1]. It's probably possible to patch it out but I haven't managed to do so. [1] https://github.com/apache/arrow/blob/master/cpp/cmake_modules/FindLz4.cmake (when setting e.g
you get errors like |
@teh have you raised an issue about this? |
I've just learned that there is |
Motivation for this change
This is probably one for @FRidh. I've been meaning to package pyarrow for a while, but it turned out to be a bit fiddly, mainly because its reliance on static libraries.
This PR is a suggestion for how we could package pyarrow, though I understand that some changes might be a bit controversial (new static flags for snappy, thrift & lz4 e.g.).
I still need to run this through
nox-review pr
& test the plasma binaryThings done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)