about summary refs log tree commit diff
path: root/pkgs/development/python-modules/parquet/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/parquet/default.nix')
-rw-r--r--pkgs/development/python-modules/parquet/default.nix44
1 files changed, 30 insertions, 14 deletions
diff --git a/pkgs/development/python-modules/parquet/default.nix b/pkgs/development/python-modules/parquet/default.nix
index 85eb41fa51d43..92e5e77647940 100644
--- a/pkgs/development/python-modules/parquet/default.nix
+++ b/pkgs/development/python-modules/parquet/default.nix
@@ -1,31 +1,46 @@
-{ lib
-, buildPythonPackage
-, fetchFromGitHub
-, pytestCheckHook
-, python-snappy
-, thriftpy2
+{
+  lib,
+  buildPythonPackage,
+  fetchFromGitHub,
+  fetchpatch,
+  pytestCheckHook,
+  python-snappy,
+  pythonOlder,
+  setuptools,
+  thriftpy2,
 }:
 
 buildPythonPackage rec {
   pname = "parquet";
   version = "1.3.1";
-  format = "setuptools";
+  pyproject = true;
+
+  disabled = pythonOlder "3.7";
 
   src = fetchFromGitHub {
     owner = "jcrobak";
     repo = "parquet-python";
-    rev = "v${version}";
-    sha256 = "1ahvg4dz9fzi4vdm9jmslq3v3jahjj17fdcc5fljgcw6h9yxyl2r";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-WVDffYKGsyepK4w1d4KUUMmxB6a6ylTbJvG79Bt5G6o=";
   };
 
-  propagatedBuildInputs = [
+  patches = [
+    # Refactor deprecated unittest aliases, https://github.com/jcrobak/parquet-python/pull/83
+    (fetchpatch {
+      name = "unittest-aliases.patch";
+      url = "https://github.com/jcrobak/parquet-python/commit/746bebd1e84d8945a3491e1ae5e44102ff534592.patch";
+      hash = "sha256-4awxlzman/YMfOz1WYNR+mVn1ixGku9sqlaMJ1QITYs=";
+    })
+  ];
+
+  build-system = [ setuptools ];
+
+  dependencies = [
     python-snappy
     thriftpy2
   ];
 
-  nativeCheckInputs = [
-    pytestCheckHook
-  ];
+  nativeCheckInputs = [ pytestCheckHook ];
 
   disabledTests = [
     # Fails with AttributeError
@@ -37,9 +52,10 @@ buildPythonPackage rec {
 
   meta = with lib; {
     description = "Python implementation of the parquet columnar file format";
-    mainProgram = "parquet";
     homepage = "https://github.com/jcrobak/parquet-python";
+    changelog = "https://github.com/jcrobak/parquet-python/releases/tag/v${version}";
     license = licenses.bsd2;
     maintainers = with maintainers; [ fab ];
+    mainProgram = "parquet";
   };
 }