widget-ts-cookiecutter icon indicating copy to clipboard operation
widget-ts-cookiecutter copied to clipboard

Building yarn package on install

Open cabreraalex opened this issue 4 years ago • 3 comments
trafficstars

I was curious if people know why the setup.py builds the package on install: https://github.com/jupyter-widgets/widget-ts-cookiecutter/blob/f8c4f1d2c61374811423eb724b9eb11c6e2f10b1/%7B%7Bcookiecutter.github_project_name%7D%7D/setup.py#L60

It looks like nbextension and labextension are both pre-built and bundled, so it isn't necessary to run npm and build:prod on install. This has also been breaking for people who do not have yarn or npm installed.

cabreraalex avatar Sep 21 '21 17:09 cabreraalex

On a related note, it looks like jupyter_packaging does not support the sdist packaging in the docs: https://github.com/jupyter/jupyter-packaging/blob/master/README.md#usage-notes

cabreraalex avatar Sep 22 '21 14:09 cabreraalex

A short term fix is to us skip_if_exists to skip the npm build if one of the built files exists. A better solution is to adopt the jupyter_packaging backend in this cookiecutter.

blink1073 avatar Sep 24 '21 10:09 blink1073

Fix at #107

cabreraalex avatar Sep 27 '21 17:09 cabreraalex