Unverified Commit 5394a2d9 authored by Mario Rodas's avatar Mario Rodas Committed by GitHub
Browse files

Merge pull request #230682 from marsam/update-m3u8

python310Packages.m3u8: 0.9.0 -> 3.4.0
parents 8d447c56 c8fed841
Loading
Loading
Loading
Loading
+23 −16
Original line number Diff line number Diff line
{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch, requests, iso8601, bottle, pytestCheckHook }:
{ lib
, buildPythonPackage
, fetchFromGitHub
, iso8601
, bottle
, pytestCheckHook
}:

buildPythonPackage rec {
  pname = "m3u8";
  version = "0.9.0";
  version = "3.4.0";

  src = fetchFromGitHub {
    owner = "globocom";
    repo = pname;
    rev = version;
    hash = "sha256-EfHhmV2otEgEy2OVohS+DF7dk97GFdWZ4cFCERZBmlA=";
    hash = "sha256-jfCmvAb7bF6nYFNUPXVG61x0RiO4vcyR+x7WzgPRLxI=";
  };

  patches = [
    # Fix hardcoded /tmp dir (fix build on Hydra)
    (fetchpatch {
      url = "https://github.com/globocom/m3u8/commit/cf7ae5fda4681efcea796cd7c51c02f152c36009.patch";
      hash = "sha256-SEETpIJQddid8D//6DVrSGs/BqDeMOzufE0bBrm+/xY=";
    })
  propagatedBuildInputs = [
    iso8601
  ];

  propagatedBuildInputs = [ requests iso8601 ];
  nativeCheckInputs = [
    bottle
    pytestCheckHook
  ];

  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"
  ];

  pytestFlagsArray = [
    "tests/test_parser.py"
    "tests/test_model.py"
    "tests/test_variant_m3u8.py"
  pythonImportsCheck = [
    "m3u8"
  ];

  meta = with lib; {
@@ -36,4 +44,3 @@ buildPythonPackage rec {
    maintainers = with maintainers; [ Scriptkiddi ];
  };
}