jupyter-widgets / widget-cookiecutter

A cookiecutter template for creating a custom Jupyter widget project.
BSD 3-Clause "New" or "Revised" License
258 stars 72 forks source link

Update packaging to use more modern python practices #87

Closed jasongrout closed 2 years ago

jasongrout commented 3 years ago

This updates the cookiecutter to use setup.cfg, etc. See https://setuptools.readthedocs.io/en/latest/build_meta.html

To generate a wheel, I think recommended practice to now use python -m build, for example.

jasongrout commented 3 years ago

CC @ibdafna

jasongrout commented 3 years ago

python -m build doesn't currently work because yarn cannot find jupyter labextension build - perhaps somehow a consequence of the virtual env the build process sets up? python -m build --no-isolation does work if the build dependencies are installed.

Also, it's unfortunate that the pyproject.toml cannot say that nodejs or yarn are required :(. I realize this is a complication from us building a package that spans two packaging ecosystems, of course.

jasongrout commented 3 years ago

python -m build doesn't currently work because yarn cannot find jupyter labextension build - perhaps somehow a consequence of the virtual env the build process sets up? python -m build --no-isolation does work if the build dependencies are installed.

This is because of this bug in build: https://github.com/pypa/build/issues/214

So this PR is stalled until at least that bug is fixed and released.

vidartf commented 3 years ago

That bug was fixed and released yesterday 🚀