mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 03:30:45 +00:00
python312Packages.pyannote-audio: refactor
This commit is contained in:
parent
3c70aa8423
commit
af9f6622b8
|
@ -1,30 +1,32 @@
|
|||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
wheel,
|
||||
asteroid-filterbanks,
|
||||
buildPythonPackage,
|
||||
einops,
|
||||
fetchFromGitHub,
|
||||
huggingface-hub,
|
||||
pytorch-lightning,
|
||||
hydra-core,
|
||||
numpy,
|
||||
omegaconf,
|
||||
pyannote-core,
|
||||
pyannote-database,
|
||||
pyannote-metrics,
|
||||
pyannote-pipeline,
|
||||
pyscaffold,
|
||||
pythonOlder,
|
||||
pytorch-lightning,
|
||||
pytorch-metric-learning,
|
||||
rich,
|
||||
semver,
|
||||
setuptools,
|
||||
soundfile,
|
||||
speechbrain,
|
||||
tensorboardx,
|
||||
torch,
|
||||
torch-audiomentations,
|
||||
torch,
|
||||
torchaudio,
|
||||
torchmetrics,
|
||||
numpy,
|
||||
pyscaffold,
|
||||
typer,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
|
@ -32,6 +34,8 @@ buildPythonPackage rec {
|
|||
version = "3.3.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pyannote";
|
||||
repo = "pyannote-audio";
|
||||
|
@ -40,20 +44,21 @@ buildPythonPackage rec {
|
|||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pythonRelaxDeps = [ "torchaudio" ];
|
||||
|
||||
build-system = [
|
||||
pyscaffold
|
||||
setuptools
|
||||
wheel
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.cfg \
|
||||
--replace "pyscaffold>=3.2a0,<3.3a0" "pyscaffold"
|
||||
--replace-fail "pyscaffold>=3.2a0,<3.3a0" "pyscaffold"
|
||||
substituteInPlace requirements.txt \
|
||||
--replace "lightning" "pytorch-lightning"
|
||||
--replace-fail "lightning" "pytorch-lightning"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dependencies = [
|
||||
asteroid-filterbanks
|
||||
einops
|
||||
huggingface-hub
|
||||
|
@ -76,6 +81,13 @@ buildPythonPackage rec {
|
|||
pytorch-lightning
|
||||
];
|
||||
|
||||
optional-dependencies = {
|
||||
cli = [
|
||||
hydra-core
|
||||
typer
|
||||
];
|
||||
};
|
||||
|
||||
pythonImportsCheck = [ "pyannote.audio" ];
|
||||
|
||||
meta = with lib; {
|
||||
|
|
Loading…
Reference in a new issue