diff --git a/pkgs/development/python-modules/indexed-bzip2/default.nix b/pkgs/development/python-modules/indexed-bzip2/default.nix index 53788b566e52..d15e075e5d57 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; @@ -27,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; }; } diff --git a/pkgs/development/python-modules/indexed-gzip/default.nix b/pkgs/development/python-modules/indexed-gzip/default.nix index 7b0bf177bf19..bfe9e894ce5f 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 ]; @@ -32,6 +33,5 @@ buildPythonPackage rec { homepage = "https://github.com/pauldmccarthy/indexed_gzip"; license = licenses.zlib; maintainers = with lib.maintainers; [ mxmlnkn ]; - platforms = platforms.all; }; } diff --git a/pkgs/development/python-modules/indexed-zstd/default.nix b/pkgs/development/python-modules/indexed-zstd/default.nix index f9d643c8ff49..88cb6f05930a 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,10 +19,12 @@ buildPythonPackage rec { hash = "sha256-icCerrv6ihBjSTS4Fsw7qhoA5ha8yegfMVRiIOhTvvY="; }; - nativeBuildInputs = [ cython ]; + nativeBuildInputs = [ cython setuptools ]; buildInputs = [ zstd.dev ]; + postPatch = "cython -3 --cplus indexed_zstd/indexed_zstd.pyx"; + # has no tests doCheck = false; @@ -32,6 +35,5 @@ buildPythonPackage rec { homepage = "https://github.com/martinellimarco/indexed_zstd"; license = licenses.mit; maintainers = with lib.maintainers; [ mxmlnkn ]; - platforms = platforms.all; }; } diff --git a/pkgs/development/python-modules/rapidgzip/default.nix b/pkgs/development/python-modules/rapidgzip/default.nix index f50537524cbf..79bddb9dba74 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; @@ -31,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; }; } diff --git a/pkgs/development/python-modules/ratarmountcore/default.nix b/pkgs/development/python-modules/ratarmountcore/default.nix index 90a45cecdb7a..844fa2c49923 100644 --- a/pkgs/development/python-modules/ratarmountcore/default.nix +++ b/pkgs/development/python-modules/ratarmountcore/default.nix @@ -1,12 +1,13 @@ { lib , buildPythonPackage -, fetchgit +, fetchFromGitHub , pythonOlder , pytestCheckHook , indexed-bzip2 , indexed-gzip , indexed-zstd , python-xz +, setuptools , rapidgzip , rarfile , zstandard # Python bindings @@ -15,35 +16,42 @@ buildPythonPackage rec { pname = "ratarmountcore"; - version = "0.6.0"; - format = "setuptools"; + version = "0.6.3"; + pyproject = true; 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="; + src = fetchFromGitHub { + owner = "mxmlnkn"; + repo = "ratarmount"; + rev = "core-v${version}"; + hash = "sha256-2jG066BUkhyHRqRyFAucQRJrjXQNw2ccCxERKkltO3Y="; fetchSubmodules = true; }; sourceRoot = "${src.name}/core"; + nativeBuildInputs = [ setuptools ]; propagatedBuildInputs = [ indexed-gzip indexed-bzip2 indexed-zstd python-xz rapidgzip rarfile ]; pythonImportsCheck = [ "ratarmountcore" ]; 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"; license = licenses.mit; maintainers = with lib.maintainers; [ mxmlnkn ]; - platforms = platforms.all; }; }