[MacPorts] #65809: py-nbconvert @7.0.0: install fails, due to build-time artifact fetch
MacPorts
noreply at macports.org
Mon Sep 19 23:08:58 UTC 2022
#65809: py-nbconvert @7.0.0: install fails, due to build-time artifact fetch
---------------------------+----------------------
Reporter: agl2015 | Owner: stromnov
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.7.2
Resolution: | Keywords:
Port: py-nbconvert |
---------------------------+----------------------
Comment (by mascguy):
Reviewing what's done in other ports, I suppose we can handle this via
direct use of `wget`/`curl`.
The following is semi-complete, apart from copying the artifacts to the
appropriate location(s) in the work area. (It's slightly more involved
than would otherwise be required, due to multiple artifacts named
`variables.css`.)
{{{
depends_fetch-append \
path:bin/wget:wget
post-fetch {
# Explicitly fetch CSS artifacts; all of this must remain in-sync
with project build script
set notebook_css_ver 5.4.0
set jupyterlab_css_ver 3.1.11
set jupyterlab_theme_light_ver 3.1.11
set jupyterlab_theme_dark_ver 3.1.11
set notebook_css_url \
https://cdn.jupyter.org/notebook/${notebook_css_ver}/style/style.min.css
set jupyterlab_css_url \
https://unpkg.com/@jupyterlab/nbconvert-
css@${jupyterlab_css_ver}/style/index.css
set jupyterlab_theme_light_url \
https://unpkg.com/@jupyterlab/theme-light-
extension@${jupyterlab_theme_light_ver}/style/variables.css
set jupyterlab_theme_dark_url \
https://unpkg.com/@jupyterlab/theme-dark-
extension@${jupyterlab_theme_dark_ver}/style/variables.css
set css_fetch_dir \
${distpath}/css
set wget_fetch_cmd \
"${prefix}/bin/wget --no-verbose --no-check-certificate
--timestamping"
xinstall -d \
${css_fetch_dir}/notebook_css \
${css_fetch_dir}/jupyterlab_css \
${css_fetch_dir}/jupyterlab_theme_light \
${css_fetch_dir}/jupyterlab_theme_dark
system -W ${css_fetch_dir}/notebook_css \
"${wget_fetch_cmd} ${notebook_css_url}"
system -W ${css_fetch_dir}/jupyterlab_css \
"${wget_fetch_cmd} ${jupyterlab_css_url}"
system -W ${css_fetch_dir}/jupyterlab_theme_light \
"${wget_fetch_cmd} ${jupyterlab_theme_light_url}"
system -W ${css_fetch_dir}/jupyterlab_theme_dark \
"${wget_fetch_cmd} ${jupyterlab_theme_dark_url}"
}
}}}
I'll leave this out here for a day or two, in case folks have any
suggestions to improve/streamline the approach.
And ultimately we should reach out to upstream, to see if they can
eliminate the need for all of this long-term.
--
Ticket URL: <https://trac.macports.org/ticket/65809#comment:7>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list