about summary refs log tree commit diff
path: root/pkgs/development/python-modules/fastparquet/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/fastparquet/default.nix')
-rw-r--r--pkgs/development/python-modules/fastparquet/default.nix32
1 files changed, 28 insertions, 4 deletions
diff --git a/pkgs/development/python-modules/fastparquet/default.nix b/pkgs/development/python-modules/fastparquet/default.nix
index 30aa6a2ab7640..e11aac39f7e65 100644
--- a/pkgs/development/python-modules/fastparquet/default.nix
+++ b/pkgs/development/python-modules/fastparquet/default.nix
@@ -8,28 +8,50 @@
 , cramjam
 , fsspec
 , thrift
+, python-lzo
 , pytestCheckHook
+, pythonOlder
 }:
 
 buildPythonPackage rec {
   pname = "fastparquet";
   version = "0.8.1";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
 
   src = fetchFromGitHub {
     owner = "dask";
     repo = pname;
     rev = version;
-    sha256 = "05qb4nz87p9vnrdsyl25hdp5sj35lki64gjza5dahc89fwfdnsmd";
+    hash = "sha256-rWrbHHcJMahaUV8+YuKkZUhdboNFUK9btjvdg74lCxc=";
   };
 
+  propagatedBuildInputs = [
+    cramjam
+    fsspec
+    numba
+    numpy
+    pandas
+    thrift
+  ];
+
+  passthru.optional-dependencies = {
+    lzo = [
+      python-lzo
+    ];
+  };
+
+  checkInputs = [
+    pytestCheckHook
+  ];
+
   postPatch = ''
     substituteInPlace setup.py \
       --replace "'pytest-runner'," "" \
       --replace "oldest-supported-numpy" "numpy"
   '';
 
-  propagatedBuildInputs = [ cramjam fsspec numba numpy pandas thrift ];
-  checkInputs = [ pytestCheckHook ];
 
   # Workaround https://github.com/NixOS/nixpkgs/issues/123561
   preCheck = ''
@@ -43,7 +65,9 @@ buildPythonPackage rec {
     rm "$fastparquet_test"
   '';
 
-  pythonImportsCheck = [ "fastparquet" ];
+  pythonImportsCheck = [
+    "fastparquet"
+  ];
 
   meta = with lib; {
     description = "A python implementation of the parquet format";