From ad85699bc1cccc58795d16b4204092d58a1d587d Mon Sep 17 00:00:00 2001 From: Maximilian Knespel Date: Mon, 4 Mar 2024 13:29:21 +0100 Subject: [PATCH 01/14] python3Packages.ratarmountcore: 0.6.0 -> 0.6.3 --- .../python-modules/ratarmountcore/default.nix | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/ratarmountcore/default.nix b/pkgs/development/python-modules/ratarmountcore/default.nix index 90a45cecdb7a..cca888423831 100644 --- a/pkgs/development/python-modules/ratarmountcore/default.nix +++ b/pkgs/development/python-modules/ratarmountcore/default.nix @@ -15,19 +15,15 @@ buildPythonPackage rec { pname = "ratarmountcore"; - version = "0.6.0"; + version = "0.6.3"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchgit { url = "https://github.com/mxmlnkn/ratarmount"; - # The revision is hardcoded for now to fix problems with the tests, which are not worthy of a new release - # tag because releases do not officially contain tests. On the next release, use the commented revision, - # which points to a release tag, instead. - #rev = "core-v${version}"; - rev = "ea43572dfbac4770a27ef2169f72ff73ee4a4ae9"; - hash = "sha256-sPApM5OW+UbujFXHSL4ptMaegajz7FNtXz/KftTlw+U="; + rev = "core-v${version}"; + hash = "sha256-2jG066BUkhyHRqRyFAucQRJrjXQNw2ccCxERKkltO3Y="; fetchSubmodules = true; }; From 20d60083caedcbae2a499f65072a11be88c8d578 Mon Sep 17 00:00:00 2001 From: Maximilian Knespel Date: Wed, 6 Mar 2024 23:18:53 +0100 Subject: [PATCH 02/14] python3Packages.ratarmountcore: Use fetchFromGitHub instead of fetchgit --- pkgs/development/python-modules/ratarmountcore/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/ratarmountcore/default.nix b/pkgs/development/python-modules/ratarmountcore/default.nix index cca888423831..69c3de261534 100644 --- a/pkgs/development/python-modules/ratarmountcore/default.nix +++ b/pkgs/development/python-modules/ratarmountcore/default.nix @@ -1,6 +1,6 @@ { lib , buildPythonPackage -, fetchgit +, fetchFromGitHub , pythonOlder , pytestCheckHook , indexed-bzip2 @@ -20,8 +20,9 @@ buildPythonPackage rec { disabled = pythonOlder "3.6"; - src = fetchgit { - url = "https://github.com/mxmlnkn/ratarmount"; + src = fetchFromGitHub { + owner = "mxmlnkn"; + repo = "ratarmount"; rev = "core-v${version}"; hash = "sha256-2jG066BUkhyHRqRyFAucQRJrjXQNw2ccCxERKkltO3Y="; fetchSubmodules = true; From 71736d33eeffd8c60879947d00a7f897af63caaa Mon Sep 17 00:00:00 2001 From: Maximilian Knespel Date: Wed, 6 Mar 2024 23:19:44 +0100 Subject: [PATCH 03/14] python3Packages.ratarmountcore: Use pyproject instead of format argument --- pkgs/development/python-modules/ratarmountcore/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/ratarmountcore/default.nix b/pkgs/development/python-modules/ratarmountcore/default.nix index 69c3de261534..106df275cbfd 100644 --- a/pkgs/development/python-modules/ratarmountcore/default.nix +++ b/pkgs/development/python-modules/ratarmountcore/default.nix @@ -7,6 +7,7 @@ , indexed-gzip , indexed-zstd , python-xz +, setuptools , rapidgzip , rarfile , zstandard # Python bindings @@ -16,7 +17,7 @@ buildPythonPackage rec { pname = "ratarmountcore"; version = "0.6.3"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.6"; @@ -30,6 +31,7 @@ buildPythonPackage rec { sourceRoot = "${src.name}/core"; + nativeBuildInputs = [ setuptools ]; propagatedBuildInputs = [ indexed-gzip indexed-bzip2 indexed-zstd python-xz rapidgzip rarfile ]; pythonImportsCheck = [ "ratarmountcore" ]; From a49b540b2d90e3dd38b06fb4af5c0473b2037795 Mon Sep 17 00:00:00 2001 From: Maximilian Knespel Date: Wed, 6 Mar 2024 23:20:05 +0100 Subject: [PATCH 04/14] python3Packages.ratarmountcore: Remove redundant platforms.all --- pkgs/development/python-modules/ratarmountcore/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/development/python-modules/ratarmountcore/default.nix b/pkgs/development/python-modules/ratarmountcore/default.nix index 106df275cbfd..2dd4732e476b 100644 --- a/pkgs/development/python-modules/ratarmountcore/default.nix +++ b/pkgs/development/python-modules/ratarmountcore/default.nix @@ -43,6 +43,5 @@ buildPythonPackage rec { homepage = "https://github.com/mxmlnkn/ratarmount/tree/master/core"; license = licenses.mit; maintainers = with lib.maintainers; [ mxmlnkn ]; - platforms = platforms.all; }; } From 8b5f61b6c423703d151958fafb4401201cee6bf4 Mon Sep 17 00:00:00 2001 From: Maximilian Knespel Date: Wed, 6 Mar 2024 23:23:35 +0100 Subject: [PATCH 05/14] python3Packages.ratarmountcore: Disable test that uses a process pool --- .../python-modules/ratarmountcore/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/python-modules/ratarmountcore/default.nix b/pkgs/development/python-modules/ratarmountcore/default.nix index 2dd4732e476b..844fa2c49923 100644 --- a/pkgs/development/python-modules/ratarmountcore/default.nix +++ b/pkgs/development/python-modules/ratarmountcore/default.nix @@ -38,6 +38,16 @@ buildPythonPackage rec { nativeCheckInputs = [ pytestCheckHook zstandard zstd ]; + disabledTestPaths = [ + # Disable this test because for arcane reasons running pytest with nix-build uses 10-100x + # more virtual memory than running the test directly or inside a local development nix-shell. + # This virtual memory usage caused os.fork called by Python multiprocessing to fail with + # "OSError: [Errno 12] Cannot allocate memory" on a test system with 16 GB RAM. It worked fine + # on a system with 96 GB RAM. In order to avoid build errors on "low"-memory systems, this + # test is disabled for now. + "tests/test_BlockParallelReaders.py" + ]; + meta = with lib; { description = "Library for accessing archives by way of indexing"; homepage = "https://github.com/mxmlnkn/ratarmount/tree/master/core"; From 6f371a5b7d322b4d3ed2441baeb24ea356a3fa8c Mon Sep 17 00:00:00 2001 From: Maximilian Knespel Date: Thu, 7 Mar 2024 10:10:14 +0100 Subject: [PATCH 06/14] python3Packages.indexed-zstd: Use pyproject instead of format argument --- pkgs/development/python-modules/indexed-zstd/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/indexed-zstd/default.nix b/pkgs/development/python-modules/indexed-zstd/default.nix index f9d643c8ff49..531cec1f9212 100644 --- a/pkgs/development/python-modules/indexed-zstd/default.nix +++ b/pkgs/development/python-modules/indexed-zstd/default.nix @@ -2,6 +2,7 @@ , buildPythonPackage , fetchPypi , pythonOlder +, setuptools , cython , zstd }: @@ -9,7 +10,7 @@ buildPythonPackage rec { pname = "indexed_zstd"; version = "1.6.0"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.6"; @@ -18,7 +19,7 @@ buildPythonPackage rec { hash = "sha256-icCerrv6ihBjSTS4Fsw7qhoA5ha8yegfMVRiIOhTvvY="; }; - nativeBuildInputs = [ cython ]; + nativeBuildInputs = [ cython setuptools ]; buildInputs = [ zstd.dev ]; From 0870f17eda49bdaf11f4b8a39d05429696c03796 Mon Sep 17 00:00:00 2001 From: Maximilian Knespel Date: Thu, 7 Mar 2024 10:12:58 +0100 Subject: [PATCH 07/14] python3Packages.indexed-zstd: Remove redundant platforms.all --- pkgs/development/python-modules/indexed-zstd/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/development/python-modules/indexed-zstd/default.nix b/pkgs/development/python-modules/indexed-zstd/default.nix index 531cec1f9212..fee2bf675cb4 100644 --- a/pkgs/development/python-modules/indexed-zstd/default.nix +++ b/pkgs/development/python-modules/indexed-zstd/default.nix @@ -33,6 +33,5 @@ buildPythonPackage rec { homepage = "https://github.com/martinellimarco/indexed_zstd"; license = licenses.mit; maintainers = with lib.maintainers; [ mxmlnkn ]; - platforms = platforms.all; }; } From 3ef984c5da26ccab1831a26172bf88c81c0fbc0a Mon Sep 17 00:00:00 2001 From: Maximilian Knespel Date: Thu, 7 Mar 2024 10:13:42 +0100 Subject: [PATCH 08/14] python3Packages.indexed-zstd: Fix compilation error with Python 3.12+ --- pkgs/development/python-modules/indexed-zstd/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/indexed-zstd/default.nix b/pkgs/development/python-modules/indexed-zstd/default.nix index fee2bf675cb4..88cb6f05930a 100644 --- a/pkgs/development/python-modules/indexed-zstd/default.nix +++ b/pkgs/development/python-modules/indexed-zstd/default.nix @@ -23,6 +23,8 @@ buildPythonPackage rec { buildInputs = [ zstd.dev ]; + postPatch = "cython -3 --cplus indexed_zstd/indexed_zstd.pyx"; + # has no tests doCheck = false; From 4bba637d53268c85818353919bb88258cfe3b4c3 Mon Sep 17 00:00:00 2001 From: Maximilian Knespel Date: Thu, 7 Mar 2024 10:14:03 +0100 Subject: [PATCH 09/14] python3Packages.indexed-gzip: Use pyproject instead of format argument --- pkgs/development/python-modules/indexed-gzip/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/indexed-gzip/default.nix b/pkgs/development/python-modules/indexed-gzip/default.nix index 7b0bf177bf19..a392ad07c9ce 100644 --- a/pkgs/development/python-modules/indexed-gzip/default.nix +++ b/pkgs/development/python-modules/indexed-gzip/default.nix @@ -2,6 +2,7 @@ , buildPythonPackage , fetchPypi , pythonOlder +, setuptools , cython , zlib }: @@ -9,7 +10,7 @@ buildPythonPackage rec { pname = "indexed_gzip"; version = "1.8.7"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -18,7 +19,7 @@ buildPythonPackage rec { hash = "sha256-dryq1LLC+lVHj/i+m60ubGGItlX5/clCnwNGrexI92I="; }; - nativeBuildInputs = [ cython ]; + nativeBuildInputs = [ cython setuptools ]; buildInputs = [ zlib ]; From bc24a81ee67f9fe5da33598ad53dc55d067157f9 Mon Sep 17 00:00:00 2001 From: Maximilian Knespel Date: Thu, 7 Mar 2024 10:14:21 +0100 Subject: [PATCH 10/14] python3Packages.indexed-gzip: Remove redundant platforms.all --- pkgs/development/python-modules/indexed-gzip/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/development/python-modules/indexed-gzip/default.nix b/pkgs/development/python-modules/indexed-gzip/default.nix index a392ad07c9ce..bfe9e894ce5f 100644 --- a/pkgs/development/python-modules/indexed-gzip/default.nix +++ b/pkgs/development/python-modules/indexed-gzip/default.nix @@ -33,6 +33,5 @@ buildPythonPackage rec { homepage = "https://github.com/pauldmccarthy/indexed_gzip"; license = licenses.zlib; maintainers = with lib.maintainers; [ mxmlnkn ]; - platforms = platforms.all; }; } From dec08bd1cc9226191a3b80b7e8bfed53d27c4692 Mon Sep 17 00:00:00 2001 From: Maximilian Knespel Date: Thu, 7 Mar 2024 10:14:35 +0100 Subject: [PATCH 11/14] python3Packages.indexed-bzip2: Use pyproject instead of format argument --- pkgs/development/python-modules/indexed-bzip2/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/indexed-bzip2/default.nix b/pkgs/development/python-modules/indexed-bzip2/default.nix index 53788b566e52..6da9cade830e 100644 --- a/pkgs/development/python-modules/indexed-bzip2/default.nix +++ b/pkgs/development/python-modules/indexed-bzip2/default.nix @@ -1,13 +1,15 @@ { lib , buildPythonPackage +, cython , fetchPypi , pythonOlder +, setuptools }: buildPythonPackage rec { pname = "indexed_bzip2"; version = "1.6.0"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.6"; @@ -16,6 +18,8 @@ buildPythonPackage rec { hash = "sha256-3HUiigZR91/nbOAMOuSHGcPtqkkEaj3VepyMhmKOHpI="; }; + nativeBuildInputs = [ cython setuptools ]; + # has no tests doCheck = false; From 6e5dae816f8bbdc5e38d6333b45af4ab9af3c1f8 Mon Sep 17 00:00:00 2001 From: Maximilian Knespel Date: Thu, 7 Mar 2024 10:14:46 +0100 Subject: [PATCH 12/14] python3Packages.indexed-bzip2: Remove redundant platforms.all --- pkgs/development/python-modules/indexed-bzip2/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/development/python-modules/indexed-bzip2/default.nix b/pkgs/development/python-modules/indexed-bzip2/default.nix index 6da9cade830e..d15e075e5d57 100644 --- a/pkgs/development/python-modules/indexed-bzip2/default.nix +++ b/pkgs/development/python-modules/indexed-bzip2/default.nix @@ -31,6 +31,5 @@ buildPythonPackage rec { homepage = "https://github.com/mxmlnkn/indexed_bzip2"; license = licenses.mit; # dual MIT and asl20, https://internals.rust-lang.org/t/rationale-of-apache-dual-licensing/8952 maintainers = with lib.maintainers; [ mxmlnkn ]; - platforms = platforms.all; }; } From a6effe02a174cb32acafdc3ebd7bca7db8d49d71 Mon Sep 17 00:00:00 2001 From: Maximilian Knespel Date: Thu, 7 Mar 2024 10:15:03 +0100 Subject: [PATCH 13/14] python3Packages.rapidgzip: Use pyproject instead of format argument --- pkgs/development/python-modules/rapidgzip/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/rapidgzip/default.nix b/pkgs/development/python-modules/rapidgzip/default.nix index f50537524cbf..1c5def44eb2f 100644 --- a/pkgs/development/python-modules/rapidgzip/default.nix +++ b/pkgs/development/python-modules/rapidgzip/default.nix @@ -1,14 +1,16 @@ { lib , buildPythonPackage +, cython , fetchPypi , pythonOlder +, setuptools , nasm }: buildPythonPackage rec { pname = "rapidgzip"; version = "0.13.0"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.6"; @@ -17,7 +19,7 @@ buildPythonPackage rec { hash = "sha256-MwT4+wzlNXfDLT/o/oT1iy9cVlFIIXc18r7dg+x5SXY="; }; - nativeBuildInputs = [ nasm ]; + nativeBuildInputs = [ cython nasm setuptools ]; # has no tests doCheck = false; From 00ce4346777517989dffcdad6e44f3a6b3659c26 Mon Sep 17 00:00:00 2001 From: Maximilian Knespel Date: Thu, 7 Mar 2024 10:15:21 +0100 Subject: [PATCH 14/14] python3Packages.rapidgzip: Remove redundant platforms.all --- pkgs/development/python-modules/rapidgzip/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/development/python-modules/rapidgzip/default.nix b/pkgs/development/python-modules/rapidgzip/default.nix index 1c5def44eb2f..79bddb9dba74 100644 --- a/pkgs/development/python-modules/rapidgzip/default.nix +++ b/pkgs/development/python-modules/rapidgzip/default.nix @@ -33,6 +33,5 @@ buildPythonPackage rec { changelog = "https://github.com/mxmlnkn/rapidgzip/blob/rapidgzip-v${version}/python/rapidgzip/CHANGELOG.md"; license = licenses.mit; # dual MIT and asl20, https://internals.rust-lang.org/t/rationale-of-apache-dual-licensing/8952 maintainers = with lib.maintainers; [ mxmlnkn ]; - platforms = platforms.all; }; }