`--project` refuses to build over a `py.typed` and over a dependency's package data
Bug Description
--project compares the data files the project configuration implies against those the build included, and aborts on a difference. Two ordinary settings trip it, independently.
A PEP 561 marker:
FATAL: Error, the expected data files from project configuration do not match the included data files.
Missing data files:
mypkg/py.typedinclude-package-data naming a dependency:
FATAL: Error, the expected data files from project configuration do not match the included data files.
Extra data files:
certifi/cacert.pemThe same project with neither builds. --project is unusable for a typed package, or one bundling a dependency's data.
Same uv_build surface as #3967 and #3968, but fatal.
️ Environment
1. Nuitka Version, Python Version, OS, and Platform
Local machine; the CI links cover all three.
4.2
Commercial: None
Python: 3.13.13 (main, Apr 14 2026, 14:32:41) [Clang 22.1.3 ]
Flavor: Python Build Standalone
GIL: yes
OS: Darwin
Arch: arm64
macOSRelease: 26.6.2
Version C compiler: clang (Apple clang 21.0.0).2. How Nuitka and Python were Installed
uv run --with nuitka==4.2 --with uv_build==0.11.13
3. Relevant PyPI Packages and Versions
uv_build 0.11.13; certifi for the second.
️ To Reproduce
1. "Hello World" Test (if applicable)
Unaffected. Needs --project and one setting below.
2. Short, Self-Contained, Correct, Eligible (SSCCE) Example
# mypkg/__main__.py
def main():
print("hello")
if __name__ == "__main__":
main()# pyproject.toml
[build-system]
build-backend = "uv_build"
requires = [ "uv-build>=0.9" ]
[project]
name = "mypkg"
version = "1.0.0"
requires-python = ">=3.11"
[project.scripts]
mypkg = "mypkg.__main__:main"
[tool.uv]
build-backend.module-root = ""
[tool.nuitka]
product-name = "Mypkg"That builds. Add an empty mypkg/py.typed: Missing data files.
For the second, drop py.typed, declare dependencies = ["certifi"], and use:
[tool.nuitka]
include-package-data = [ "certifi" ]That fails with Extra data files.
3. Nuitka Command Line Options
$ python -m nuitka --project --mode=standalone --assume-yes-for-downloadsSame outcome on three runners: https://github.com/kdeldycke/nuitka-test/blob/main/.github/workflows/project-data-files.yaml
control: exit=0
py-typed: exit=1 Missing data files: mypkg/py.typed
dep-data: exit=1 Extra data files: certifi/cacert.pemhttps://github.com/kdeldycke/nuitka-test/actions/runs/33792597586/job/100772521992#step:3:178
https://github.com/kdeldycke/nuitka-test/actions/runs/33792597586/job/100772521743#step:3:185
https://github.com/kdeldycke/nuitka-test/actions/runs/33792597586/job/100772521511#step:3:182
Expected Behavior
I expected both to build: a py.typed is package data the wheel ships, and include-package-data naming a dependency is the documented way to bundle its data.
Source: Nuitka/Nuitka