biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / mido / default.nix
blob33b06eadfbd3c190b4063d43a2690c5a2dad66ec
2   stdenv,
3   lib,
4   buildPythonPackage,
5   fetchPypi,
6   substituteAll,
8   # build-system
9   setuptools,
10   setuptools-scm,
12   # dependencies
13   packaging,
15   # native dependencies
16   portmidi,
18   # optional-dependencies
19   pygame,
20   python-rtmidi,
21   rtmidi-python,
23   # tests
24   pytestCheckHook,
25   pythonOlder,
29 buildPythonPackage rec {
30   pname = "mido";
31   version = "1.3.2";
32   pyproject = true;
34   disabled = pythonOlder "3.7";
36   src = fetchPypi {
37     inherit pname version;
38     hash = "sha256-Ouootu1zD3N9WxLaNXjevp3FAFj6Nw/pzt7ZGJtnw0g=";
39   };
41   patches = [
42     (substituteAll {
43       src = ./libportmidi-cdll.patch;
44       libportmidi = "${portmidi.out}/lib/libportmidi${stdenv.hostPlatform.extensions.sharedLibrary}";
45     })
46   ];
48   build-system = [
49     setuptools
50     setuptools-scm
51   ];
53   pythonRelaxDeps = [ "packaging" ];
55   dependencies = [ packaging ];
57   optional-dependencies = {
58     ports-pygame = [ pygame ];
59     ports-rtmidi = [ python-rtmidi ];
60     ports-rtmidi-python = [ rtmidi-python ];
61   };
63   nativeCheckInputs = [ pytestCheckHook ];
65   pythonImportsCheck = [ "mido" ];
67   meta = with lib; {
68     description = "MIDI Objects for Python";
69     homepage = "https://mido.readthedocs.io";
70     changelog = "https://github.com/mido/mido/releases/tag/${version}";
71     license = licenses.mit;
72     maintainers = [ ];
73   };