python311Packages.mido: fix build, set up optional dependencies
This commit is contained in:
parent
4913815067
commit
97011cdd1c
|
@ -3,12 +3,27 @@
|
|||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, substituteAll
|
||||
, portmidi
|
||||
, python-rtmidi
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
|
||||
# build-system
|
||||
, setuptools
|
||||
, setuptools-scm
|
||||
, pythonRelaxDepsHook
|
||||
|
||||
# dependencies
|
||||
, packaging
|
||||
|
||||
# native dependencies
|
||||
, portmidi
|
||||
|
||||
# optional-dependencies
|
||||
, pygame
|
||||
, python-rtmidi
|
||||
, rtmidi-python
|
||||
|
||||
# tests
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
|
@ -20,7 +35,7 @@ buildPythonPackage rec {
|
|||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-Ouootu1zD3N9WxLaNXjevp3FAFj6Nw/pzt7ZGJtnw0g=";
|
||||
hash = "sha256-Ouootu1zD3N9WxLaNXjevp3FAFj6Nw/pzt7ZGJtnw0g=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
@ -30,15 +45,26 @@ buildPythonPackage rec {
|
|||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
build-system = [
|
||||
setuptools
|
||||
setuptools-scm
|
||||
pythonRelaxDepsHook
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
python-rtmidi
|
||||
pythonRelaxDeps = [
|
||||
"packaging"
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
packaging
|
||||
];
|
||||
|
||||
optional-dependencies = {
|
||||
ports-pygame = [ pygame ];
|
||||
ports-rtmidi = [ python-rtmidi ];
|
||||
ports-rtmidi-python = [ rtmidi-python ];
|
||||
};
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue