depot/third_party/nixpkgs/pkgs/development/python-modules/torchlibrosa/default.nix
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

41 lines
987 B
Nix

{ stdenv
, lib
, buildPythonPackage
, fetchPypi
, librosa
, numpy
, torch
}:
buildPythonPackage rec {
pname = "torchlibrosa";
version = "0.1.0";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-Yqi+7fnJtBQaBiNN8/ECKfe6huZ2eMzuAkiexO8EQCg=";
};
propagatedBuildInputs = [
librosa
numpy
torch
];
# Project has no tests.
# In order to make pythonImportsCheck work, NUMBA_CACHE_DIR env var need to
# be set to a writable dir (https://github.com/numba/numba/issues/4032#issuecomment-488102702).
# pythonImportsCheck has no pre* hook, use checkPhase to workaround that.
checkPhase = ''
export NUMBA_CACHE_DIR="$(mktemp -d)"
'';
pythonImportsCheck = [ "torchlibrosa" ];
meta = with lib; {
description = "PyTorch implemention of part of librosa functions";
homepage = "https://github.com/qiuqiangkong/torchlibrosa";
license = licenses.mit;
maintainers = with maintainers; [ azuwis ];
};
}