thaler-lab / Wasserstein

Python/C++ library for computing Wasserstein distances efficiently.
https://thaler-lab.github.io/Wasserstein
Other
21 stars 8 forks source link

Update build to use `scikit-build-core` instead of `setuptools` #51

Open j-s-ashley opened 1 week ago

j-s-ashley commented 1 week ago

To support packaging and CI/CD modernization in line with Scientific Python Best Practices, the scikit-build-core build backend should be used instead of setuptools.

j-s-ashley commented 1 week ago

Progress on the working branch for this issue is currently hindered by two (likely related somehow) errors:

  1. ubuntu-latest and macos-13 fail while building with Ninja
  2. windows-latest fails while building with Visual Studio

According to the workflow logs, the Ubuntu and MacOS builds fail to locate Python.h and the Windows build can't find any of the wasserstein/internal/ files.

j-s-ashley commented 1 day ago

Build attempts currently fail on all platforms with the following error:

/home/runner/work/Wasserstein/Wasserstein/wasserstein/wasserstein.cpp:179:11: fatal error: Python.h: No such file or directory
        179 | # include <Python.h>
            |           ^~~~~~~~~~
      compilation terminated.

This build uses find_package to find both Python interpreter and development modules in CMakeLists.txt.