python3Packages.youtube-transcript-api: disable on older Python releases

This commit is contained in:
Fabian Affolter 2022-03-31 09:46:15 +02:00 committed by GitHub
parent 007e031f53
commit c97498aeee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,22 +1,40 @@
{ lib, buildPythonPackage, fetchFromGitHub, requests, mock, httpretty, pytestCheckHook }: { lib
, buildPythonPackage
, fetchFromGitHub
, requests
, mock
, httpretty
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec { buildPythonPackage rec {
pname = "youtube-transcript-api"; pname = "youtube-transcript-api";
version = "0.4.4"; version = "0.4.4";
format = "setuptools";
disabled = pythonOlder "3.7";
# PyPI tarball is missing some test files
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "jdepoix"; owner = "jdepoix";
repo = "youtube-transcript-api"; repo = pname;
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-RNPWTgAOwS+tXGLQYyIyka36xS1E1499OAP84aT6m3A="; hash = "sha256-RNPWTgAOwS+tXGLQYyIyka36xS1E1499OAP84aT6m3A=";
}; };
propagatedBuildInputs = [ requests ]; propagatedBuildInputs = [
requests
];
checkInputs = [ mock httpretty pytestCheckHook ]; checkInputs = [
mock
httpretty
pytestCheckHook
];
pythonImportsCheck = [ "youtube_transcript_api" ]; pythonImportsCheck = [
"youtube_transcript_api"
];
meta = with lib; { meta = with lib; {
description = "Python API which allows you to get the transcripts/subtitles for a given YouTube video"; description = "Python API which allows you to get the transcripts/subtitles for a given YouTube video";