Skip to content

Commit 7f67e68

Browse files
authored
python312Packages.manim: 0.18.1 -> 0.19.0 (NixOS#375320)
2 parents b480e5a + 12c287b commit 7f67e68

File tree

2 files changed

+55
-41
lines changed

2 files changed

+55
-41
lines changed

pkgs/development/python-modules/manim/default.nix

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,26 @@
22
lib,
33
buildPythonPackage,
44
fetchFromGitHub,
5+
texliveInfraOnly,
6+
7+
# build-system
58
poetry-core,
6-
pytest-xdist,
7-
pytestCheckHook,
8-
pythonOlder,
99

10+
# buildInputs
1011
cairo,
11-
ffmpeg,
12-
texliveInfraOnly,
1312

13+
# dependencies
14+
av,
15+
beautifulsoup4,
1416
click,
1517
cloup,
1618
decorator,
1719
isosurfaces,
18-
jupyterlab,
1920
manimpango,
2021
mapbox-earcut,
2122
moderngl,
2223
moderngl-window,
2324
networkx,
24-
notebook,
2525
numpy,
2626
pillow,
2727
pycairo,
@@ -36,6 +36,17 @@
3636
tqdm,
3737
typing-extensions,
3838
watchdog,
39+
40+
# optional-dependencies
41+
jupyterlab,
42+
notebook,
43+
44+
# tests
45+
ffmpeg,
46+
pytest-cov-stub,
47+
pytest-xdist,
48+
pytestCheckHook,
49+
versionCheckHook,
3950
}:
4051

4152
let
@@ -175,41 +186,26 @@ in
175186
buildPythonPackage rec {
176187
pname = "manim";
177188
pyproject = true;
178-
version = "0.18.1";
179-
disabled = pythonOlder "3.9";
189+
version = "0.19.0";
180190

181191
src = fetchFromGitHub {
182192
owner = "ManimCommunity";
183193
repo = "manim";
184194
tag = "v${version}";
185-
hash = "sha256-o+Wl3NMK6yopcsRVFtZuUE9c1GABa5d8rbQNHDJ4OiQ=";
195+
hash = "sha256-eQgp/GwKsfQA1ZgqfB3HF2ThEgH3Fbn9uAtcko9pkjs=";
186196
};
187197

188198
build-system = [
189199
poetry-core
190200
];
191201

192-
pythonRelaxDeps = [
193-
"cloup"
194-
"isosurfaces"
195-
"pillow"
196-
"skia-pathops"
197-
"watchdog"
198-
];
199-
200202
patches = [ ./pytest-report-header.patch ];
201203

202-
postPatch = ''
203-
substituteInPlace pyproject.toml \
204-
--replace "--no-cov-on-fail --cov=manim --cov-report xml --cov-report term" ""
205-
206-
substituteInPlace manim/_config/default.cfg \
207-
--replace "ffmpeg_executable = ffmpeg" "ffmpeg_executable = ${lib.getExe ffmpeg}"
208-
'';
209-
210204
buildInputs = [ cairo ];
211205

212206
dependencies = [
207+
av
208+
beautifulsoup4
213209
click
214210
cloup
215211
decorator
@@ -257,25 +253,29 @@ buildPythonPackage rec {
257253
nativeCheckInputs = [
258254
ffmpeg
259255
manim-tinytex
256+
pytest-cov-stub
260257
pytest-xdist
261258
pytestCheckHook
259+
versionCheckHook
262260
];
261+
versionCheckProgramArg = [ "--version" ];
263262

264263
# about 55 of ~600 tests failing mostly due to demand for display
265264
disabledTests = import ./failing_tests.nix;
266265

267266
pythonImportsCheck = [ "manim" ];
268267

269-
meta = with lib; {
268+
meta = {
270269
description = "Animation engine for explanatory math videos - Community version";
271270
longDescription = ''
272271
Manim is an animation engine for explanatory math videos. It's used to
273272
create precise animations programmatically, as seen in the videos of
274273
3Blue1Brown on YouTube. This is the community maintained version of
275274
manim.
276275
'';
276+
changelog = "https://docs.manim.community/en/latest/changelog/${version}-changelog.html";
277277
homepage = "https://github.com/ManimCommunity/manim";
278-
license = licenses.mit;
278+
license = lib.licenses.mit;
279279
maintainers = [ ];
280280
};
281281
}
Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
1-
diff --git a/conftest.py b/conftest.py
2-
index dacb730a..149c6702 100644
3-
--- a/conftest.py
4-
+++ b/conftest.py
5-
@@ -33,17 +33,3 @@ def temp_media_dir(tmpdir, monkeypatch, request):
6-
with tempconfig({"media_dir": str(tmpdir)}):
7-
assert config.media_dir == str(tmpdir)
8-
yield tmpdir
9-
-
10-
-
1+
diff --git a/tests/conftest.py b/tests/conftest.py
2+
index 4de34bbb..07b4bea6 100644
3+
--- a/tests/conftest.py
4+
+++ b/tests/conftest.py
5+
@@ -4,31 +4,11 @@ import logging
6+
import sys
7+
from pathlib import Path
8+
9+
-import cairo
10+
-import moderngl
11+
import pytest
12+
13+
import manim
14+
15+
1116
-def pytest_report_header(config):
12-
- ctx = moderngl.create_standalone_context()
13-
- info = ctx.info
14-
- ctx.release()
17+
- try:
18+
- ctx = moderngl.create_standalone_context()
19+
- info = ctx.info
20+
- ctx.release()
21+
- except Exception as e:
22+
- raise Exception("Error while creating moderngl context") from e
23+
-
1524
- return (
1625
- f"\nCairo Version: {cairo.cairo_version()}",
1726
- "\nOpenGL information",
@@ -20,3 +29,8 @@ index dacb730a..149c6702 100644
2029
- f"renderer: {info['GL_RENDERER'].strip()}",
2130
- f"version: {info['GL_VERSION'].strip()}\n",
2231
- )
32+
-
33+
-
34+
def pytest_addoption(parser):
35+
parser.addoption(
36+
"--skip_slow",

0 commit comments

Comments
 (0)