Skip to content

tool.hatch.build.targets.sdist.include is ignored for non-python files #1817

@eguiraud-pf

Description

@eguiraud-pf

Hello, I am trying to convince hatch to include some C++ source files in the sdist archive. I would like to understand why using include does not work (force-include does, but it does not support globs like **/*.h, so it's not optimal).

Given the docs I would expect this to work.

I'm using all the globs I could think of but the sdist does not contain that submodule.h file:

[tool.hatch.build.targets.sdist]
include = [
  "hatch_bazel_and_pybind11/**/*.h",
  "hatch_bazel_and_pybind11/cpp/submodule",
  "hatch_bazel_and_pybind11/cpp/submodule/submodule.h",
  "src/hatch_bazel_and_pybind11/cpp/submodule",
  "src/hatch_bazel_and_pybind11/cpp/submodule",
  "src/hatch_bazel_and_pybind11/cpp/submodule/submodule.h",
]

A full reproducer is available at https://github.com/eguiraud/hatch-bazel-and-pybind11/tree/include-problem-repro .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions