1{ 2 lib, 3 buildPythonPackage, 4 cython, 5 fetchPypi, 6 pythonOlder, 7 setuptools, 8 nasm, 9}: 10 11buildPythonPackage rec { 12 pname = "rapidgzip"; 13 version = "0.14.3"; 14 pyproject = true; 15 16 disabled = pythonOlder "3.6"; 17 18 src = fetchPypi { 19 inherit pname version; 20 hash = "sha256-fTXwrxZXtAUakMPAwsDSQz886Dnbkw/b7T1lFt4qXfE="; 21 }; 22 23 prePatch = '' 24 # pythonRelaxDeps doesn't work here 25 substituteInPlace pyproject.toml --replace-fail "setuptools >= 61.2, < 72" "setuptools" 26 ''; 27 28 nativeBuildInputs = [ 29 cython 30 nasm 31 setuptools 32 ]; 33 34 # has no tests 35 doCheck = false; 36 37 pythonImportsCheck = [ "rapidgzip" ]; 38 39 meta = with lib; { 40 description = "Python library for parallel decompression and seeking within compressed gzip files"; 41 mainProgram = "rapidgzip"; 42 homepage = "https://github.com/mxmlnkn/rapidgzip"; 43 changelog = "https://github.com/mxmlnkn/rapidgzip/blob/rapidgzip-v${version}/python/rapidgzip/CHANGELOG.md"; 44 license = licenses.mit; # dual MIT and asl20, https://internals.rust-lang.org/t/rationale-of-apache-dual-licensing/8952 45 maintainers = with lib.maintainers; [ mxmlnkn ]; 46 }; 47}