python310Packages.soxr: init at 0.3.3

Packaged as a dependency for librosa.
This commit is contained in:
Martin Weinelt 2023-03-01 17:16:20 +01:00
parent f91eefa88e
commit 5b3185becc
2 changed files with 64 additions and 0 deletions

View File

@ -0,0 +1,60 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
# build-sytem
, cython_3
, numpy
, setuptools
, setuptools-scm
, gnutar
# native
, libsoxr
# tests
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "soxr";
version = "0.3.3";
format = "pyproject";
src = fetchFromGitHub {
owner = "dofuuz";
repo = "python-soxr";
rev = "refs/tags/v${version}";
hash = "sha256-Kpw+KeXkkZlNLq8BMNMKtgBxe5Wb71jNaXZFmjjP34o=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
cython_3
gnutar
numpy
setuptools
setuptools-scm
];
postPatch = ''
tar -xf ${libsoxr.src} -C libsoxr
mv libsoxr/soxr-*/* libsoxr/
'';
pythonImportsCheck = [
"soxr"
];
nativeCheckInputs = [
pytestCheckHook
];
meta = with lib; {
description = "High quality, one-dimensional sample-rate conversion library";
homepage = "https://github.com/dofuuz/python-soxr/tree/main";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ hexa ];
};
}

View File

@ -10864,6 +10864,10 @@ self: super: with self; {
soupsieve = callPackage ../development/python-modules/soupsieve { };
soxr = callPackage ../development/python-modules/soxr {
libsoxr = pkgs.soxr;
};
spacy = callPackage ../development/python-modules/spacy { };
spacy-alignments = callPackage ../development/python-modules/spacy-alignments { };