nixpkgs/pkgs/development/python-modules/m3u8/default.nix
2024-04-02 09:49:05 +02:00

58 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, iso8601
, bottle
, pytestCheckHook
, pythonOlder
, setuptools
}:
buildPythonPackage rec {
pname = "m3u8";
version = "4.1.0";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "globocom";
repo = "m3u8";
rev = "refs/tags/${version}";
hash = "sha256-vH5y/fk9dW8w54U3o+70enbTOubV4V0/NVbSSqOY9rQ=";
};
build-system = [
setuptools
];
dependencies = [
iso8601
];
nativeCheckInputs = [
bottle
pytestCheckHook
];
disabledTests = [
# Tests require network access
"test_load_should_create_object_from_uri"
"test_load_should_create_object_from_uri_with_relative_segments"
"test_load_should_remember_redirect"
"test_raise_timeout_exception_if_timeout_happens_when_loading_from_uri"
];
pythonImportsCheck = [
"m3u8"
];
meta = with lib; {
description = "Python m3u8 parser";
homepage = "https://github.com/globocom/m3u8";
changelog = "https://github.com/globocom/m3u8/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ Scriptkiddi ];
};
}