python312Packages.yoda: 2.0.1 -> 2.0.2
[NixPkgs.git] / pkgs / development / python-modules / py-multicodec / default.nix
bloba657d8eb459d6d776ea000a967e37c83b716d322
2   lib,
3   buildPythonPackage,
4   fetchFromGitHub,
5   morphys,
6   pytestCheckHook,
7   pythonOlder,
8   six,
9   varint,
12 buildPythonPackage rec {
13   pname = "py-multicodec";
14   version = "0.2.1";
15   format = "setuptools";
17   disabled = pythonOlder "3.7";
19   src = fetchFromGitHub {
20     owner = "multiformats";
21     repo = pname;
22     rev = "refs/tags/v${version}";
23     hash = "sha256-2aK+bfhqCMqSO+mtrHIfNQmQpQHpwd7yHseI/3O7Sp4=";
24   };
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   '';
35   propagatedBuildInputs = [
36     morphys
37     six
38     varint
39   ];
41   nativeCheckInputs = [ pytestCheckHook ];
43   pythonImportsCheck = [ "multicodec" ];
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   };