2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
environs,
|
|
|
|
fetchFromGitHub,
|
|
|
|
poetry-core,
|
|
|
|
pytest-mock,
|
|
|
|
pytest-vcr,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
tornado,
|
2021-04-25 03:57:28 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "deezer-python";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "6.2.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2021-04-25 03:57:28 +00:00
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-09-22 15:38:15 +00:00
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "browniebroke";
|
2024-01-02 11:29:13 +00:00
|
|
|
repo = "deezer-python";
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-Y1y8FBxpGpNIWCZbel9fdGLGC9VM9h1BvHtUxCZxp/A=";
|
2021-04-25 03:57:28 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
2024-06-05 15:53:02 +00:00
|
|
|
--replace-fail " --cov=deezer" ""
|
2024-01-02 11:29:13 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ poetry-core ];
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
requests
|
|
|
|
tornado
|
2021-04-25 03:57:28 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-10-17 09:34:42 +00:00
|
|
|
environs
|
2021-09-22 15:38:15 +00:00
|
|
|
pytest-mock
|
2021-10-17 09:34:42 +00:00
|
|
|
pytest-vcr
|
|
|
|
pytestCheckHook
|
2021-04-25 03:57:28 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "deezer" ];
|
2021-09-22 15:38:15 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
disabledTests = [
|
|
|
|
# JSONDecodeError issue
|
|
|
|
"test_get_user_flow"
|
|
|
|
"test_with_language_header"
|
|
|
|
];
|
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
meta = with lib; {
|
2021-10-17 09:34:42 +00:00
|
|
|
description = "Python wrapper around the Deezer API";
|
2021-04-25 03:57:28 +00:00
|
|
|
homepage = "https://github.com/browniebroke/deezer-python";
|
2022-11-27 09:42:12 +00:00
|
|
|
changelog = "https://github.com/browniebroke/deezer-python/releases/tag/v${version}";
|
2021-04-25 03:57:28 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ synthetica ];
|
|
|
|
};
|
|
|
|
}
|