1{
2 lib,
3 buildPythonPackage,
4 decorator,
5 fetchFromGitHub,
6 imageio,
7 imageio-ffmpeg,
8 matplotlib,
9 numpy,
10 proglog,
11 pytestCheckHook,
12 pythonOlder,
13 requests,
14 scikit-image,
15 scikit-learn,
16 scipy,
17 setuptools,
18 tqdm,
19 youtube-dl,
20}:
21
22buildPythonPackage rec {
23 pname = "moviepy";
24 version = "1.0.3";
25 pyproject = true;
26
27 disabled = pythonOlder "3.7";
28
29 src = fetchFromGitHub {
30 owner = "Zulko";
31 repo = "moviepy";
32 rev = "refs/tags/v${version}";
33 hash = "sha256-l7AwzAKSaEV+pPbltKgwllK6X54oruU2w0AvoCsrESE=";
34 };
35
36 postPatch = ''
37 substituteInPlace setup.py \
38 --replace-fail "decorator>=4.0.2,<5.0" "decorator>=4.0.2,<6.0"
39 '';
40
41 build-system = [ setuptools ];
42
43 dependencies = [
44 decorator
45 imageio
46 imageio-ffmpeg
47 numpy
48 proglog
49 requests
50 tqdm
51 ];
52
53 passthru.optional-dependencies = {
54 optionals = [
55 matplotlib
56 scikit-image
57 scikit-learn
58 scipy
59 youtube-dl
60 ];
61 };
62
63 nativeCheckInputs = [
64 pytestCheckHook
65 ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
66
67 pythonImportsCheck = [ "moviepy" ];
68
69 disabledTests = [
70 "test_cuts1"
71 "test_issue"
72 "test_PR"
73 "test_setup"
74 "test_subtitles"
75 "test_sys_write_flush"
76 ];
77
78 disabledTestPaths = [
79 "tests/test_compositing.py"
80 "tests/test_fx.py"
81 "tests/test_ImageSequenceClip.py"
82 "tests/test_resourcerelease.py"
83 "tests/test_resourcereleasedemo.py"
84 "tests/test_TextClip.py"
85 "tests/test_VideoClip.py"
86 "tests/test_Videos.py"
87 "tests/test_videotools.py"
88 ];
89
90 meta = with lib; {
91 description = "Video editing with Python";
92 homepage = "https://zulko.github.io/moviepy/";
93 changelog = "https://github.com/Zulko/moviepy/blob/v${version}/CHANGELOG.md";
94 license = licenses.mit;
95 maintainers = with maintainers; [ ];
96 };
97}