K3D-tools / K3D-jupyter

K3D lets you create 3D plots backed by WebGL with high-level API (surfaces, isosurfaces, voxels, mesh, cloud points, vtk objects, volume renderer, colormaps, etc). The primary aim of K3D-jupyter is to be easy for use as stand alone package like matplotlib, but also to allow interoperation with existing libraries as VTK.
MIT License
917 stars 123 forks source link

chore: skip if package already built #397

Closed agoose77 closed 1 year ago

agoose77 commented 1 year ago

hatch-jupyter-builder always runs by default, unless we set skip-if-exists

agoose77 commented 1 year ago

@artur-trzesiok The reason this PR is needed is because hatch-jupyter-builder runs a build by default, even if the SDist contains the k3d/labextension build output already. This PR changes that, by skipping the build if the k3d/labextension/package.json exists.

This is partly happening because we don't have to ship the compiled artefacts in the SDist; we could only ship the source, and require that the user has nodejs installed. This is my preferred approach to packaging, but in #395 (and #386) we explicitly include the generated files in the SDist.

What is your preferred solution here? Would you prefer smaller SDists that require compilation, or to ship the compiled JS?

artur-trzesiok commented 1 year ago

But sdist include compiled js. Please check my k3d-2.15.0.tar.gz : filestructure.txt

And sdist is still in good size (9.5mb). I don't need to make in smaller. K3D is a python package so I don't want to force users to use nodejs

artur-trzesiok commented 1 year ago

I assume that after that merge we should deploy 2.15.1 to trigger conda-forge process

agoose77 commented 1 year ago

@artur-trzesiok yes, probably. Apologies for the confusion. Let me first confirm that this sdist doesn't require nodejs