Conversation
Automatically download GTK3 libs for cairocffi if necessary
Add dependence of tqdm
| __all__ = ["__version__", "load_default_settings_files"] | ||
|
|
||
| if not find_library("libcairo-2"): | ||
| fix_cairo() |
There was a problem hiding this comment.
This kind of thing is better done in setup.py rather than as part of the that gets run on every invocation of mathicsscript.
There was a problem hiding this comment.
I'll move the GTK+ installation part to setup.py when I have time. As for set_dll_search_path(), it should get run on every invocation of mathicsscript unless cairocffi itself is fixed. I've put in a PR to cairocffi and if they approve it, everything can be done in setup.py.
There was a problem hiding this comment.
I've put in a PR to cairocffi and if they approve it, everything can be done in setup.py.
Awesome!
setup.py
Outdated
| # "mathics_pygments @ https://github.com/Mathics3/mathics-pygments/archive/master.zip#egg=mathics_pygments", | ||
| "mathics_pygments>=1.0.2", | ||
| "term-background >= 1.0.1", | ||
| 'tqdm', |
There was a problem hiding this comment.
This is a dependency that is only needed for Windows right now.
|
Maybe is a silly question but the cairo-2 dependency should not be fixed in Mathics-core? |
I am glad you asked, because it made me look into this deeper... git grep -n 'cairo'
mathicsscript/format.py:46: from cairosvg import svg2png
requirements-full.txt:3:cairosvg # For rendering Plots and Graphs as SVGs via matplotlibAnd if you look in Mathics-core there is nothing. So this is only needed when we want full dependencies. And it is good that it is not in Mathics-core since ideally we would like to offload dependencies when possible. |
|
@rocky, thanks for checking this up. In that case, LGTM. |
Forgot to remove tqdm's dependency on system other than Windows before :(
Add fixcairo.py to install GTK+ for Windows Runtime Environment for users if needed. Automatically load GTK+ dlls when mathicsscript starts.
TODO:
Update setup.py to automatically run fix_cairo() for Windows after installation.