diff --git a/tools/cufinufft/build-sdist.sh b/tools/cufinufft/build-sdist.sh new file mode 100755 index 000000000..981e8bc1a --- /dev/null +++ b/tools/cufinufft/build-sdist.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -e -x + +# Move pyproject.toml to root (otherwise no way to include C++ sources in sdist). +mv finufft/python/cufinufft/pyproject.toml finufft/ + +# Fix paths in pyproject.toml to reflect the new directory structure. +toml set --toml-path finufft/pyproject.toml \ + tool.scikit-build.cmake.source-dir "." +toml set --toml-path finufft/pyproject.toml \ + tool.scikit-build.wheel.packages --to-array "[\"python/cufinufft/cufinufft\"]" +toml set --toml-path finufft/pyproject.toml \ + tool.scikit-build.metadata.version.input "python/cufinufft/cufinufft/__init__.py" + +# Package the sdist. +python3 -m build --verbose --sdist --outdir wheelhouse finufft diff --git a/tools/finufft/build-sdist.sh b/tools/finufft/build-sdist.sh new file mode 100755 index 000000000..3b68832bd --- /dev/null +++ b/tools/finufft/build-sdist.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -e -x + +# Move pyproject.toml to root (otherwise no way to include C++ sources in sdist). +mv finufft/python/finufft/pyproject.toml finufft/ + +# Fix paths in pyproject.toml to reflect the new directory structure. +toml set --toml-path finufft/pyproject.toml \ + tool.scikit-build.cmake.source-dir "." +toml set --toml-path finufft/pyproject.toml \ + tool.scikit-build.wheel.packages --to-array "[\"python/finufft/finufft\"]" +toml set --toml-path finufft/pyproject.toml \ + tool.scikit-build.metadata.version.input "python/finufft/finufft/__init__.py" + +# Package the sdist. +python3 -m build --verbose --sdist --outdir wheelhouse finufft