Using Poetry for building `JupyterLab Prebuilt Extension`
igaloly opened this issue · 3 comments
When I use JupyterLab's cookiecutter to create a new project and I build via setup.py
,
when I'm installing the package, pip install . --upgrade
, the some of the packages files are copied to share/jupyter/labextesions
folder (the desired functionality)
BUT, when I'm using Poetry to build it, it seems like the after-install copy is not happening.
I've read that packages that were built with poetry DO NOT allow for arbitrary code execution after installation.
Is it the reason for the failure? IF NOT, I would like to get an explanation for that.
Wheels do not have a post install hook. See pypa/packaging-problems#64.
The reason why your setup tools build is working is most likely because of setup.py being executed at build time prior to install. Assuming sdist is what is being installed.
There could be two ways you could achieve similar results with poetry.
Option 1: This works for sdist only packages. You can add a build script that moves the files into the desired location. (Similar to setup tools scenario.)
Option 2: This might be a more universal option. You can include the files in the wheel, and add logic to move the files from the package directory to desired locations if they do not already exist within the root package's __init__.py
.
should be closed
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.