// It sounds like you are working from a dev install, and are talking about the
jupyterlab/staging directory in the git repo - is that right?
Ans: Yes, that is correct.
// The staging directory in the repo is populated/updated during the JLab release process. The normal dev workflow (changing a file in the repo, doing
jlpm run build , and running
jupyter lab --dev-mode ) does not touch or use the staging directory.
Ans: Yes, that is what I found out. So I was wondering if there is any way to update those.
Eventually, what I did was a real hack: I just copy the changes from dev dir to staging dir myself. Since I have changed only a few files, that was not too bad. I was able to make a pip .whl from the updated source and then can be installed by pip.
Sorry for not replying earlier. I was able to figure out the workaround and was busy in setting up a CICD pipeline to build the special jupyterlab.
What was interesting was that after pip install my special jupyterlab, the jupyter-lab and jupyter-labextension dud not exist in the bin/. This behavior was different from the usual conda install jupyterlab (both could be found in the same bin/ directory where jupyter can be found).
I actually tried to populate the jupyter-lab (and jupyter-labextesion). Both were short python scripts (that I borrowed from jupyter-lab from conda install):
$ cat /opt/conda/bin/jupyter-lab
from jupyterlab.labapp import main
if __name__ == '__main__':
sys.argv = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv)
However, jupyter-lab failed in not able to find jupyterlab.labapp (ModuleNotFound error). Upon troubleshooting, I found that jupyterlab had only a few attributes: not even jupyterlab.version was there. These were what was defined:
['__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__']
I am not sure why attributes like version is missing, and more importantly, why I cannot run jupyterlab.labapp.main( ). (I actually can see jupyterlab/ in the site-package/ directory).
So in summary, I am able to make a pip .whl of the dev build of jupyterlab, but there is no jupyter-lab, and the jupyterlab module does not have jupyterlab.labapp. (I plan to post this to a new question in this board).
Any comment or help would be greatly appreciated. Thanks very much!