Skip to content

Commit

Permalink
py: add sdist packaging scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
janden committed Sep 10, 2024
1 parent 2cdb575 commit 349a52c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tools/cufinufft/build-sdist.sh
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions tools/finufft/build-sdist.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 349a52c

Please sign in to comment.