create dummy script packages for ffmpeg and imagemagick
seblabbe opened this issue · 25 comments
One advantage is that when the feature ffmpeg or imagemagick is needed, an error message will now suggest how to install ffmpeg or imagemagick according to the system (debian, cygwin, macports, homebrew, etc.).
From #32650 comment:33
See also #32926 comment:24
Part of #30930
Component: packages: optional
Author: Sébastien Labbé
Branch: 6dd8bca
Reviewer: Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/32956
Description changed:
---
+++
@@ -1 +1,3 @@
From [#32650 comment:33](https://github.com/sagemath/sage/issues/32650#comment:33)
+
+Part of #30930... and maybe also pdftocairo
Description changed:
---
+++
@@ -1,3 +1,5 @@
From [#32650 comment:33](https://github.com/sagemath/sage/issues/32650#comment:33)
+See also [#32926 comment:24](https://github.com/sagemath/sage/issues/32926#comment:24)
+
Part of #30930Author: Sébastien Labbé
Branch: u/slabbe/32956
A question I have is whether ffmpeg should be removed from the following list (like it is the case for pandoc?):
$ cat build/pkgs/_recommended/distros/debian.txt
# From https://wiki.sagemath.org/prerequisitesUbuntu
# to generate pdf documentation
texlive-latex-extra
# to convert Jupyter notebooks to pdf
texlive-xetex
# to generate pdf documentation
latexmk
# to convert Jupyter notebooks to pdf
# pandoc -- this is a separate script package
# to render text with LaTeX in Matplotlib
dvipng
# to run the Jmol 3D viewer from the console and generate images for 3D plots in the documentation
default-jdk
# to produce animations
ffmpeg
libavdevice-dev
Yes.
In return, add the new packages to src/doc/bootstrap in the same way that pandoc appears there
Ok replacing the line _recommended:*|pandoc:*) by _recommended:*|pandoc:*|ffmpeg:*) ?
$ grep pandoc src/doc/bootstrap -C4
case "$PKG_BASE:$PKG_TYPE" in
*:standard)
SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
;;
_recommended:*|pandoc:*)
RECOMMENDED_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
;;
*)
OPTIONAL_SYSTEM_PACKAGES+=" $PKG_SYSTEM_PACKAGES"
I find it weird that those pandoc, ffmpeg and imagemagick need to be hardcoded in the src/doc/bootstrap file. Isn't there a better way to do this?
It's code for generating some lines in one page of the documentation. I don't think we need a more general mechanism for that
The first line of SPKG.rst should be edited to follow the same format as the items in https://doc.sagemath.org/html/en/reference/spkg/
Branch pushed to git repo; I updated commit sha1. New commits:
ed81f65 | 32956: adding ffmpeg and imagemagick to src/doc/bootstrap |
Branch pushed to git repo; I updated commit sha1. New commits:
d8f707c | 32956: fix first line of SPKG.rst to match the format of all the other packages |
Branch pushed to git repo; I updated commit sha1. New commits:
6dd8bca | 32956: remove ffmpeg and imagemagick from _recommended/distros/*.txt files |
So, I understand that by removing ffmpeg and imagemagick from _recommended/distros/*.txt files, they will not be suggested to be installed when they are already installed anymore.
But, in the case that ffmpeg and imagemagick are not installed, let's say, will the configure script say that these are recommended packages somehow? I don't see how this will happen with the commits I have done in the ticket so far.
(also, let's do pdftocairo in another ticket, maybe in #20343 if I use it instead of pdf2svg)
Anyway, needs review!
Description changed:
---
+++
@@ -1,3 +1,5 @@
+One advantage is that when the feature `ffmpeg` or `imagemagick` is needed, an error message will now suggest how to install `ffmpeg` or `imagemagick` according to the system (debian, cygwin, macports, homebrew, etc.).
+
From [#32650 comment:33](https://github.com/sagemath/sage/issues/32650#comment:33)
See also [#32926 comment:24](https://github.com/sagemath/sage/issues/32926#comment:24)Replying to @seblabbe:
in the case that ffmpeg and imagemagick are not installed, let's say, will the configure script say that these are recommended packages somehow? I don't see how this will happen with the commits I have done in the ticket so far.
Yes, this behavior is triggered by the spkg-configure.m4 files added in the ticket.
Reviewer: Matthias Koeppe
Changed branch from u/slabbe/32956 to 6dd8bca