Commit ca80d704 authored by Emily's avatar Emily
Browse files

python3Packages.ffmpeg-python: use `pyproject`

parent bdcd19ef
Loading
Loading
Loading
Loading
+16 −16
Original line number Diff line number Diff line
@@ -2,21 +2,19 @@
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  ffmpeg_4,
  substituteAll,
  setuptools,
  future,
  pytest-mock,
  pytestCheckHook,
  pytest-mock,
  ffmpeg_4,
  pythonAtLeast,
  pythonOlder,
  substituteAll,
}:

buildPythonPackage rec {
  pname = "ffmpeg-python";
  version = "0.2.0";
  format = "setuptools";

  disabled = pythonOlder "3.7";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "kkroening";
@@ -25,13 +23,6 @@ buildPythonPackage rec {
    hash = "sha256-Dk3nHuYVlIiFF6nORZ5TVFkBXdoZUxLfoiz68V1tvlY=";
  };

  propagatedBuildInputs = [ future ];

  nativeCheckInputs = [
    pytestCheckHook
    pytest-mock
  ];

  patches = [
    (substituteAll {
      src = ./ffmpeg-location.patch;
@@ -39,6 +30,15 @@ buildPythonPackage rec {
    })
  ];

  build-system = [ setuptools ];

  dependencies = [ future ];

  nativeCheckInputs = [
    pytestCheckHook
    pytest-mock
  ];

  postPatch = ''
    substituteInPlace setup.py \
      --replace "'pytest-runner'" ""
@@ -48,10 +48,10 @@ buildPythonPackage rec {

  disabledTests = lib.optionals (pythonAtLeast "3.10") [ "test__output__video_size" ];

  meta = with lib; {
  meta = {
    description = "Python bindings for FFmpeg - with complex filtering support";
    homepage = "https://github.com/kkroening/ffmpeg-python";
    license = licenses.asl20;
    license = lib.licenses.asl20;
    maintainers = [ ];
  };
}