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.1.1";
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-pzEXiWKMP2Wqme/pqfTMHxWH/4YcCS6u865wslHrUqI=";
27 };
28
29 postPatch = ''
30 substituteInPlace pyproject.toml \
31 --replace " --cov=deezer" ""
32 '';
33
34 nativeBuildInputs = [ poetry-core ];
35
36 nativeCheckInputs = [
37 environs
38 pytest-mock
39 pytest-vcr
40 pytestCheckHook
41 ];
42
43 propagatedBuildInputs = [
44 requests
45 tornado
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}