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