2021-03-23 19:22:30 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-10-30 15:09:59 +00:00
|
|
|
, fetchFromGitHub
|
2021-03-23 19:22:30 +00:00
|
|
|
, flaky
|
2022-10-30 15:09:59 +00:00
|
|
|
, hatch-vcs
|
|
|
|
, hatchling
|
2022-04-27 09:35:20 +00:00
|
|
|
, httpx
|
2021-12-21 02:18:32 +00:00
|
|
|
, importlib-metadata
|
2021-03-23 19:22:30 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2020-06-15 15:56:04 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pylast";
|
2022-10-30 15:09:59 +00:00
|
|
|
version = "5.1.0";
|
|
|
|
format = "pyproject";
|
2021-12-21 02:18:32 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pylast";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-LRZYLo9h7Z8WXemLgKR5qzAmtL4x/AQQJpta3e0WHcc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
2021-12-21 02:18:32 +00:00
|
|
|
nativeBuildInputs = [
|
2022-10-30 15:09:59 +00:00
|
|
|
hatch-vcs
|
|
|
|
hatchling
|
2021-12-21 02:18:32 +00:00
|
|
|
];
|
2021-03-23 19:22:30 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-04-27 09:35:20 +00:00
|
|
|
httpx
|
2021-12-21 02:18:32 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
2021-03-23 19:22:30 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
flaky
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-21 02:18:32 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pylast"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-03-23 19:22:30 +00:00
|
|
|
description = "Python interface to last.fm (and compatibles)";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/pylast/pylast";
|
|
|
|
license = licenses.asl20;
|
2022-10-30 15:09:59 +00:00
|
|
|
maintainers = with maintainers; [ fab rvolosatovs ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|