Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create dummy script packages for ffmpeg and imagemagick #32956

Closed
seblabbe opened this issue Dec 1, 2021 · 25 comments
Closed

create dummy script packages for ffmpeg and imagemagick #32956

seblabbe opened this issue Dec 1, 2021 · 25 comments

Comments

@seblabbe
Copy link
Contributor

seblabbe commented Dec 1, 2021

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

@seblabbe seblabbe added this to the sage-9.5 milestone Dec 1, 2021
@seblabbe

This comment has been minimized.

@seblabbe
Copy link
Contributor Author

seblabbe commented Dec 1, 2021

comment:2

... and maybe also pdftocairo

@seblabbe

This comment has been minimized.

@seblabbe
Copy link
Contributor Author

seblabbe commented Dec 2, 2021

Commit: 656bb52

@seblabbe
Copy link
Contributor Author

seblabbe commented Dec 2, 2021

New commits:

f94241f32956: adding build/pkgs/ffmpeg
2f7b1cd32956: adding build/pkgs/imagemagick
656bb5232956: link ffmpeg and imagemagick features to the spkg

@seblabbe
Copy link
Contributor Author

seblabbe commented Dec 2, 2021

Author: Sébastien Labbé

@seblabbe
Copy link
Contributor Author

seblabbe commented Dec 2, 2021

Branch: u/slabbe/32956

@seblabbe
Copy link
Contributor Author

seblabbe commented Dec 2, 2021

comment:5

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

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 2, 2021

comment:6

Yes.

In return, add the new packages to src/doc/bootstrap in the same way that pandoc appears there

@seblabbe
Copy link
Contributor Author

seblabbe commented Dec 3, 2021

comment:7

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?

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 4, 2021

comment:8

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

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 4, 2021

comment:9

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/

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 9, 2021

Changed commit from 656bb52 to ed81f65

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 9, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

ed81f6532956: adding ffmpeg and imagemagick to src/doc/bootstrap

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 9, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

d8f707c32956: fix first line of SPKG.rst to match the format of all the other packages

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 9, 2021

Changed commit from ed81f65 to d8f707c

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 9, 2021

Changed commit from d8f707c to 6dd8bca

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 9, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

6dd8bca32956: remove ffmpeg and imagemagick from _recommended/distros/*.txt files

@seblabbe
Copy link
Contributor Author

seblabbe commented Dec 9, 2021

comment:13

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!

@seblabbe

This comment has been minimized.

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 9, 2021

comment:15

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.

@mkoeppe
Copy link
Contributor

mkoeppe commented Dec 10, 2021

Reviewer: Matthias Koeppe

@vbraun
Copy link
Member

vbraun commented Dec 23, 2021

Changed branch from u/slabbe/32956 to 6dd8bca

@mkoeppe
Copy link
Contributor

mkoeppe commented Feb 2, 2022

comment:18

Replying to @mkoeppe:

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

A second use case for this list of packages has surfaced, so I have now opened #33277

@mkoeppe
Copy link
Contributor

mkoeppe commented Feb 2, 2022

Changed commit from 6dd8bca to none

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants