I'm trying to update the port `py-jupytext` since the recent updates to Jupyterlab. The jupytext package now uses node.js and jlpm to build. The port `py-jupyterlab` provides jlpm, but it is in the path as `jlpm-{python.branch}`, and consequently jupytext cannot find it. I tried patching `${worksrcpath}/pyproject.toml` to have

npm = ["jlpm-${python.branch}"]

This is similar to the Portfile for py-notebook. It helps get past the first use of jlpm, but a later step fails:

command not found: jlpm

Recommendations for how to resolve this issue? Is there a way to set an alias during the build phase?

alias jlpm="jlpm-${python.branch}"

Or add "${prefix}/Library/Frameworks/Python.framework/Versions/${python.branch}/bin" to the path? I haven't been successful implementing either approach.

Thanks,
Jonathan

P.S.
I've been wondering if it is worth the trouble to create and maintain ports for some of these python packages. These days they are often using advanced python-internal build tools that are difficult to configure, while `pip install <package>` often just works. By comparison, there is a port for Julia but none of its packages, instead relying entirely on Julia's package manager. I'm curious about the thoughts of others on this matter.

Reply via email to