1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 flaky,
6 hatch-vcs,
7 hatchling,
8 httpx,
9 importlib-metadata,
10 pytestCheckHook,
11 pythonOlder,
12}:
13
14buildPythonPackage rec {
15 pname = "pylast";
16 version = "5.2.0";
17 format = "pyproject";
18
19 disabled = pythonOlder "3.8";
20
21 src = fetchFromGitHub {
22 owner = "pylast";
23 repo = pname;
24 rev = "refs/tags/${version}";
25 hash = "sha256-6yxsqruosSOJ5LeIBbvuEko4s9qU/ObNZiJD5YH/hvY=";
26 };
27
28 nativeBuildInputs = [
29 hatch-vcs
30 hatchling
31 ];
32
33 propagatedBuildInputs = [ httpx ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
34
35 nativeCheckInputs = [
36 pytestCheckHook
37 flaky
38 ];
39
40 pythonImportsCheck = [ "pylast" ];
41
42 meta = with lib; {
43 description = "Python interface to last.fm (and compatibles)";
44 homepage = "https://github.com/pylast/pylast";
45 license = licenses.asl20;
46 maintainers = with maintainers; [
47 fab
48 rvolosatovs
49 ];
50 };
51}