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.5.0";
17 pyproject = true;
18
19 disabled = pythonOlder "3.9";
20
21 src = fetchFromGitHub {
22 owner = "pylast";
23 repo = "pylast";
24 tag = version;
25 hash = "sha256-mPdFG3wqdAyluD37cy2q6oO/x9NgXpOb57s4nU05EzQ=";
26 };
27
28 build-system = [
29 hatch-vcs
30 hatchling
31 ];
32
33 dependencies = [ 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 changelog = "https://github.com/pylast/pylast/releases/tag/${src.tag}";
46 license = licenses.asl20;
47 maintainers = with maintainers; [
48 fab
49 rvolosatovs
50 ];
51 };
52}