Skip to content

python: Drop C source from installed package - #390

Open
mripard wants to merge 1 commit into
tree-sitter:masterfrom
mripard:fix-c-files-in-wheel
Open

mripard wants to merge 1 commit into
tree-sitter:masterfrom
mripard:fix-c-files-in-wheel

Conversation

@mripard

@mripard mripard commented Sep 29, 2026

Copy link
Copy Markdown

Modern setuptools with pyproject.toml defaults to
include_package_data=True, which includes all version-controlled files in package directories. Since binding.c lives inside the tree_sitter_javascript package directory, it gets installed alongside the compiled extension.

This triggers rpmlint devel-file-in-non-devel-package warnings on distributions that lint for development files in runtime packages.

Exclude *.c files from the installed package data. The C sources are still used as compilation inputs during the build, but are no longer shipped in the wheel or installed site-packages.

Modern setuptools with pyproject.toml defaults to
include_package_data=True, which includes all version-controlled files
in package directories. Since binding.c lives inside the
tree_sitter_javascript package directory, it gets installed alongside
the compiled extension.

This triggers rpmlint devel-file-in-non-devel-package warnings on
distributions that lint for development files in runtime packages.

Exclude *.c files from the installed package data. The C sources are
still used as compilation inputs during the build, but are no longer
shipped in the wheel or installed site-packages.

Signed-off-by: Maxime Ripard <mripard@kernel.org>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant