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

pandoc should be an optional, not required, dependency #24

Closed
JoshRosen opened this issue Sep 10, 2018 · 5 comments · Fixed by #47
Closed

pandoc should be an optional, not required, dependency #24

JoshRosen opened this issue Sep 10, 2018 · 5 comments · Fixed by #47

Comments

@JoshRosen
Copy link

I think that pandoc should be an optional dependency of nbconvert, not a required one.

Per the nbconvert docs:

To unlock nbconvert’s full capabilities requires Pandoc and TeX (specifically, XeLaTeX). These must be installed separately.

The nbconvert README mentions pandoc only in the "development install" instructions and does not claim it as a required dependency.

For my use-case I only care about converting to HTML and I don't want pandoc to be automatically installed because it adds significant file-size bloat. This is especially a problem when moving from pip to conda because pip install nbconvert didn't install pandoc.

Conda has a currently-undocumented feature for marking optional dependencies as run_constrained: conda/conda#1696. Perhaps this mechanism could be used to express the relationship between nbconvert and pandoc without forcing the latter to be installed?

Perhaps my use-case is uncommon, but I wanted to open an issue to start discussion because I currently need to perform an ugly workaround to remove pandoc after installation.

@ocefpaf
Copy link
Member

ocefpaf commented Sep 11, 2018

I'm reluctant to remove pandoc as a require dep b/c probably 99% of the users need it. At the same time I don't want to penalize with a bloated env the other 1% that does not... So, do you want to send a PR to test run_constrained?

@minrk
Copy link
Member

minrk commented Sep 11, 2018

The main reason pandoc isn't required by the Python package is because it can't be. There isn't a pip package for it. If pandoc were a Python package, it would probably be a strict dependency of nbconvert. Since pandoc is required for most things nbconvert does (HTML output being the main exception), it makes sense for nbconvert to depend on it in conda, since it can.

If conda had a "recommended dependencies" facility like apt, where a 'default' install would get what's needed for most things to work (pandoc), but users could opt-in to a "just the basics" install, we could leave out nbconvert, analogous to apt-get install --no-install-recommends nbconvert. I wish pip had the same...

@minrk
Copy link
Member

minrk commented Mar 28, 2022

It's been years now, but w have the convention of a -core package with minimal dependencies (see matplotlib and matplotlib-core, etc.). I'd be happy with an nbconvert-core leaving out pandoc, and nbconvert depending on nbconvert-core and pandoc.

@bollwyvl
Copy link
Contributor

Sure, I can warm #47 back up. There appear to be <30 feedstock that directly reference nbconvert, so probably wouldn't even need an automated migration.

@bollwyvl
Copy link
Contributor

#47 is ready for review

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

Successfully merging a pull request may close this issue.

4 participants