1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, morphys 5, pytestCheckHook 6, pythonOlder 7, six 8, varint 9}: 10 11buildPythonPackage rec { 12 pname = "py-multicodec"; 13 version = "0.2.1"; 14 format = "setuptools"; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "multiformats"; 20 repo = pname; 21 rev = "refs/tags/v${version}"; 22 hash = "sha256-2aK+bfhqCMqSO+mtrHIfNQmQpQHpwd7yHseI/3O7Sp4="; 23 }; 24 25 # Error when not substituting: 26 # Failed: [pytest] section in setup.cfg files is no longer supported, change to [tool:pytest] instead. 27 postPatch = '' 28 substituteInPlace setup.cfg \ 29 --replace "[pytest]" "[tool:pytest]" 30 substituteInPlace setup.py \ 31 --replace "'pytest-runner'," "" 32 ''; 33 34 propagatedBuildInputs = [ 35 morphys 36 six 37 varint 38 ]; 39 40 nativeCheckInputs = [ 41 pytestCheckHook 42 ]; 43 44 pythonImportsCheck = [ 45 "multicodec" 46 ]; 47 48 meta = with lib; { 49 description = "Compact self-describing codecs"; 50 homepage = "https://github.com/multiformats/py-multicodec"; 51 license = licenses.mit; 52 maintainers = with maintainers; [ Luflosi ]; 53 }; 54}