Skip to content

Add support for re-packaging and distributing existing VTK wheel SDKs #1

@jcfr

Description

@jcfr
  • Re-package existing SDK

    • Add file VTKSDKURLs.cmake listing URLs (https://vtk.org/files/wheel-sdks/) and SHAs of the relevant URLs intended to be re-packaged. Adapt from s5cmdUrls.cmake1 and consider matching the expected URL leveraging the variable Python3_SOABI2.

    • Update pyproject.toml setting wheel.install-dir = "vtk_wheel_sdk/content". Similar to how the content of the cmake package is installed when creating the corresponding wheel3

    • Adapt code from cmake-python-distributions/CMakeLists.txt4 to install the content of the existing vtk-sdk archive.

  • Entrypoint support

    • Add the following files to the project:

      vtk-sdk-python-distributions/src/vtk_wheel_sdk/__init__.py
      vtk-sdk-python-distributions/src/vtk_wheel_sdk/vtk-config.cmake
      vtk-sdk-python-distributions/src/vtk_wheel_sdk/vtk-config-version.cmake
      

      The files vtk-config.cmake and vtk-config-version.cmake aims to conveniently include the corresponding files installed in vtk_wheel_sdk/content/vtk-X.Y.Z.data/headers/cmake/vtk-config.cmake

    • Update pyproject.toml declaring the scikit-build-core "cmake.module" entry point5:

      [project.entry-points."cmake.module"]
      any = "vtk_wheel_sdk"
      
  • Integration @jcfr

Footnotes

  1. https://github.com/ImagingDataCommons/s5cmd-python-distributions/blob/main/s5cmdUrls.cmake

  2. https://cmake.org/cmake/help/latest/module/FindPython3.html

  3. https://github.com/scikit-build/cmake-python-distributions/blob/ab6a1365046ce83c6931c48d93c5c78112118c3f/pyproject.toml#L58

  4. https://github.com/scikit-build/cmake-python-distributions/blob/560c40d038149556651fe8b01e66093c01aceb30/CMakeLists.txt#L422-L461

  5. https://scikit-build-core.readthedocs.io/en/latest/cmakelists.html#finding-other-packages

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions