Not sure how to rebuild Jupyterlab as a PyPi or Conda Package

We are making modifications to existing Jupyterlab extensions and creating new extensions. We have our own private PyPi and Conda repository in our enterprise Artifactory cluster. We would like to rebuild our modifications to Jupyterlab as either a Conda or PyPi package and then store it in our private PyPi repository or Conda repository in Artifactory. The goal is to be able install our modified Jupyterlab into a Docker image either by doing a conda install or pip3 install against our private Conda or PyPi repositories.

I have not been able to find any instructions how to create a Conda or PyPi Jupyterlab package. Can someone provide me with guidance how to accomplish this.

1 Like

Our release instructions are in https://github.com/jupyterlab/jupyterlab/blob/ba572d39ed418d348a75ba09482986e0b6a238e9/RELEASE.md and rely on a series of shell scripts that automate most of the work.

If you do not need to support users installing their own extensions, the example at https://github.com/jupyterlab/jupyterlab/tree/master/examples/app provides a much simpler way to build a monolithic JupyterLab app package with a given set of core plugins.

Jason:

You have been most kind in helping us.

We read through the RELEASE.md. We are working behind a corporate firewall and are blocked from downloading PyPi and Conda packages and other dependencies from the internet. All of our access to PyPi and Conda is through our internal Artifactory hosted PyPi and Conda repositories.

Can you tell us what modifications we need to make to the scripts outlined in RELEASE.md so that we can create a Conda package?

Best wishes,

mark

Without knowing more details about your environment, I won’t be able to help customize things to your situation. If you just need a single build with a preset number of plugins, without needing the ability to install more plugins after the build, I’d strongly suggest building on the app example in the jlab source, as it is much simpler to build a self-contained package. If you have to be able to install plugins at run time, then I’d suggest looking at the release scripts and seeing what they do, and perhaps getting together with someone who can look more closely into your particular requirements.

Is there any way we can do a short call (952.292.4882) or We Ex? (I’ll text or email the web ex URL if you want to do a Web Ex)

Our first release – 3 weeks time – involves modifications to the following components.

  1. filebrowser
  2. filebrowser-extension
  3. notebook-extension

Subsequent releases will involve creating new extensions.

I’ll respond via direct message at this point.

+1 on the same. Please let know your findings. I had asked a similar question earlier - Build jupyterlab from the source and deploy

It’d be great, if we have an option to build from sources with extensions enabled. So that any organisational changes can be made in the source code and changes being build without having to publish all artifacts.

i am able to build the PIP package for jupyter lab source with some functions like upload download and drag and drop disabled but after installing that whl package i am not able to see tha chnages done in source code. Do i have to use some build command before creating a PIP package out of the code

The artifacts that you build should be about the same, you then can use external configurations to publish to internal repositories:

For publishing into artifactory pypi, add the appropriated configuration into:

  • ~/.pypirc needs a section like [internal] with repository and username
  • .pip/pip.conf needs extra-index-url

Then use twine uploda --sign --repository [internal] dist/*.whl

For publishing packages into artifactory npm, add the appropriated configuration into:

  • ~/.npmrc needs to have your registry info and authorization information

Then use --registry to npm publish to the specific repository that you are using

Having said that, we were publishing extensions to artifactory, and didn’t have any specific updates to JLab itself.

Thanks for the update