Skip to content

Commit

Permalink
Remove MANIFEST.in use auto-generated one for sdists and package_data…
Browse files Browse the repository at this point in the history
… for wheels (#1348)

Using MANIFEST.in currently runs into a pretty nasty scikit-build bug (scikit-build/scikit-build#886) that results in any file included by the manifest being copied from the install tree back into the source tree whenever an in place build occurs after an install, overwriting any local changes. We need an alternative approach to ensure that all necessary files are included in built packages. There are two types:
- sdists: scikit-build automatically generates a manifest during sdist generation if we don't provide one, and that manifest is reliably complete. It contains all files needed for a source build up to the raft C++ code (which has always been true and is something we can come back to improving later if desired).
- wheels: The autogenerated manifest is not used during wheel generation because the manifest generation hook is not invoked during wheel builds, so to include data in the wheels we must provide the `package_data` argument to `setup`. In this case we do not need to include CMake or pyx files because the result does not need to be possible to build from, it just needs pxd files for other packages to cimport if desired.

Authors:
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Ben Frederickson (https://github.com/benfred)

URL: #1348
  • Loading branch information
vyasr authored Mar 17, 2023
1 parent 4577cbe commit 40f246d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 18 deletions.
7 changes: 0 additions & 7 deletions python/pylibraft/MANIFEST.in

This file was deleted.

5 changes: 3 additions & 2 deletions python/pylibraft/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ def exclude_libcxx_symlink(cmake_manifest):
)


packages = find_packages(include=["pylibraft*"])
setup(
include_package_data=True,
# Don't want libcxx getting pulled into wheel builds.
cmake_process_manifest_hook=exclude_libcxx_symlink,
packages=find_packages(include=["pylibraft", "pylibraft.*"]),
packages=packages,
package_data={key: ["*.pxd"] for key in packages},
zip_safe=False,
)
7 changes: 0 additions & 7 deletions python/raft-dask/MANIFEST.in

This file was deleted.

5 changes: 3 additions & 2 deletions python/raft-dask/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ def exclude_libcxx_symlink(cmake_manifest):
)


packages = find_packages(include=["raft_dask*"])
setup(
include_package_data=True,
cmake_process_manifest_hook=exclude_libcxx_symlink,
packages=find_packages(include=["raft_dask", "raft_dask.*"]),
packages=packages,
package_data={key: ["*.pxd"] for key in packages},
zip_safe=False,
)

0 comments on commit 40f246d

Please sign in to comment.