From 06a70ea1c70ef65e248e67ffca66ff2613fabf9e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 29 Apr 2024 12:30:56 +0200 Subject: python312Packages.parquet: refactor --- pkgs/development/python-modules/parquet/default.nix | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/parquet/default.nix b/pkgs/development/python-modules/parquet/default.nix index 85eb41fa51d43..f0ac3b6234bc2 100644 --- a/pkgs/development/python-modules/parquet/default.nix +++ b/pkgs/development/python-modules/parquet/default.nix @@ -3,22 +3,30 @@ , fetchFromGitHub , 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 = [ + build-system = [ + setuptools + ]; + + dependencies = [ python-snappy thriftpy2 ]; @@ -37,9 +45,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"; }; } -- cgit 1.4.1 From f9240363509fcc8568335bd65e82736768dc4522 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 29 Apr 2024 12:31:45 +0200 Subject: python312Packages.parquet: format with nixfmt --- .../development/python-modules/parquet/default.nix | 25 ++++++++++------------ 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/parquet/default.nix b/pkgs/development/python-modules/parquet/default.nix index f0ac3b6234bc2..6c5035e1669e6 100644 --- a/pkgs/development/python-modules/parquet/default.nix +++ b/pkgs/development/python-modules/parquet/default.nix @@ -1,11 +1,12 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, pytestCheckHook -, python-snappy -, pythonOlder -, setuptools -, thriftpy2 +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pytestCheckHook, + python-snappy, + pythonOlder, + setuptools, + thriftpy2, }: buildPythonPackage rec { @@ -22,18 +23,14 @@ buildPythonPackage rec { hash = "sha256-WVDffYKGsyepK4w1d4KUUMmxB6a6ylTbJvG79Bt5G6o="; }; - build-system = [ - setuptools - ]; + build-system = [ setuptools ]; dependencies = [ python-snappy thriftpy2 ]; - nativeCheckInputs = [ - pytestCheckHook - ]; + nativeCheckInputs = [ pytestCheckHook ]; disabledTests = [ # Fails with AttributeError -- cgit 1.4.1 From 637b8990b68de3202e677d40b2459524a43dfd91 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 29 Apr 2024 12:34:11 +0200 Subject: python312Packages.parquet: add patch for deprecated unittest aliases --- pkgs/development/python-modules/parquet/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/python-modules/parquet/default.nix b/pkgs/development/python-modules/parquet/default.nix index 6c5035e1669e6..92e5e77647940 100644 --- a/pkgs/development/python-modules/parquet/default.nix +++ b/pkgs/development/python-modules/parquet/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchFromGitHub, + fetchpatch, pytestCheckHook, python-snappy, pythonOlder, @@ -23,6 +24,15 @@ buildPythonPackage rec { hash = "sha256-WVDffYKGsyepK4w1d4KUUMmxB6a6ylTbJvG79Bt5G6o="; }; + 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 = [ -- cgit 1.4.1