2023-08-04 22:07:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
|
|
|
, dataclasses-json
|
|
|
|
, isodate
|
|
|
|
, requests
|
|
|
|
, requests-oauthlib
|
|
|
|
, pytestCheckHook
|
|
|
|
, responses
|
|
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-youtube";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.9.3";
|
2023-08-04 22:07:22 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "sns-sdks";
|
|
|
|
repo = "python-youtube";
|
2023-10-19 13:55:26 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-vd+cbESypc/q7eSrERqkMvGhVMIfKMsoxPblPJwPiUg=";
|
2023-08-04 22:07:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pytest.ini \
|
|
|
|
--replace "--cov=pyyoutube" "" \
|
|
|
|
--replace "--cov-report xml" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
dataclasses-json
|
|
|
|
isodate
|
|
|
|
requests
|
|
|
|
requests-oauthlib
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "pyyoutube" ];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
responses
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A simple Python wrapper around for YouTube Data API";
|
|
|
|
homepage = "https://github.com/sns-sdks/python-youtube";
|
|
|
|
changelog = "https://github.com/sns-sdks/python-youtube/blob/${src.rev}/CHANGELOG.md";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ blaggacao ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|