1{
2 lib,
3 buildPythonPackage,
4 environs,
5 fetchFromGitHub,
6 poetry-core,
7 pytest-mock,
8 pytest-vcr,
9 pytestCheckHook,
10 pythonOlder,
11 requests,
12 tornado,
13}:
14
15buildPythonPackage rec {
16 pname = "deezer-python";
17 version = "6.2.0";
18 pyproject = true;
19
20 disabled = pythonOlder "3.7";
21
22 src = fetchFromGitHub {
23 owner = "browniebroke";
24 repo = "deezer-python";
25 rev = "refs/tags/v${version}";
26 hash = "sha256-Y1y8FBxpGpNIWCZbel9fdGLGC9VM9h1BvHtUxCZxp/A=";
27 };
28
29 postPatch = ''
30 substituteInPlace pyproject.toml \
31 --replace-fail " --cov=deezer" ""
32 '';
33
34 build-system = [ poetry-core ];
35
36 dependencies = [
37 requests
38 tornado
39 ];
40
41 nativeCheckInputs = [
42 environs
43 pytest-mock
44 pytest-vcr
45 pytestCheckHook
46 ];
47
48 pythonImportsCheck = [ "deezer" ];
49
50 disabledTests = [
51 # JSONDecodeError issue
52 "test_get_user_flow"
53 "test_with_language_header"
54 ];
55
56 meta = with lib; {
57 description = "Python wrapper around the Deezer API";
58 homepage = "https://github.com/browniebroke/deezer-python";
59 changelog = "https://github.com/browniebroke/deezer-python/releases/tag/v${version}";
60 license = licenses.mit;
61 maintainers = with maintainers; [ synthetica ];
62 };
63}