Opened 11 years ago

Last modified 5 years ago

#39216 new enhancement

py-ipython: include offline copy of MathJax

Reported by: lpsinger (Leo Singer) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: cooljeanius (Eric Gallager), petrrr, eejd, stromnov (Andrey Stromnov)
Port: py-ipython

Description

The IPython Notebook offers an option to install an offline copy of MathJax. This is really helpful for using the IPython Notebook without internet access. The installation instructions say that you do this by running the following Python snippet:

from IPython.external.mathjax import install_mathjax
install_mathjax()

However, this requires write access to the site-packages directory. As such, it would be handy if this was offered as a port variant, +mathjax.

I noticed another ticket, #39197, that has a dependency on MathJax. Perhaps a MathJax port would be in order here?

Attachments (1)

patch-Portfile.diff (2.6 KB) - added by lpsinger (Leo Singer) 11 years ago.
Proposed patch for Portfile

Download all attachments as: .zip

Change History (14)

comment:1 Changed 11 years ago by larryv (Lawrence Velázquez)

Owner: changed from akitada to akitada@…
Version: 2.1.3

comment:2 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

Changed 11 years ago by lpsinger (Leo Singer)

Attachment: patch-Portfile.diff added

Proposed patch for Portfile

comment:3 Changed 11 years ago by lpsinger (Leo Singer)

I just attached a path for the py-ipython Portfile that adds a mathjax variant ("Install offline copy of MathJax 2.2"). This variant adds MathJax 2.2 to the distfiles and then moves it into place during post-destroot.

comment:4 Changed 11 years ago by mf2k (Frank Schima)

Shouldn't this be a whole new port? py-mathjax?

comment:5 in reply to:  4 ; Changed 11 years ago by lpsinger (Leo Singer)

Replying to macsforever2000@…:

Shouldn't this be a whole new port? py-mathjax?

It could be a new port. Maybe not py-mathjax, because (as far as I know) MathJax itself doesn't contain any Python, just JavaScript and CSS.

comment:6 Changed 10 years ago by petrrr

Cc: Peter.Danecek@… added

Cc Me!

comment:7 in reply to:  5 Changed 10 years ago by lpsinger (Leo Singer)

Replying to aronnax@…:

Replying to macsforever2000@…:

Shouldn't this be a whole new port? py-mathjax?

It could be a new port. Maybe not py-mathjax, because (as far as I know) MathJax itself doesn't contain any Python, just JavaScript and CSS.

IPython is just downloading and unpacking a mathjax tarball. Is it sufficient to create a port that has that tarball expanded into ${prefix}/share/mathjax?

comment:8 Changed 10 years ago by mf2k (Frank Schima)

From looking at the ipython docs, mathjax looks just like a python module as much as tornado and jinja which are mentioned along side it. We already have ports for py-jinja and py-tornado. So I think this should be treated like a python module too and called py-mathjax.

comment:9 Changed 10 years ago by eejd

Cc: edewitt@… added

Cc Me!

comment:10 Changed 10 years ago by eejd

I don't see any python in MathJax. I think it could be a port, but wouldn't be a 'py-' port. However, because it's basically a rendering engine, in this case I think it seems like it would make sense to either package it as a variant or make it a separate package. I, too, would like to see one of the too solutions implemented. Let me know if I can help—but I haven't worked on port files in a while...

comment:11 Changed 10 years ago by lpsinger (Leo Singer)

Might as well be a separate package. Note that as far as MacPorts is concerned, it's 100% architecture-independent data files, should go in share.

comment:12 Changed 10 years ago by mf2k (Frank Schima)

Owner: changed from akitada@… to macports-tickets@…

This port is no longer maintained. See #43692.

comment:13 Changed 5 years ago by mf2k (Frank Schima)

Cc: stromnov added
Note: See TracTickets for help on using tickets.