Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[build-system]
build-backend = "setuptools.build_meta"
build-backend = "hatchling.build"

requires = [ "setuptools>=45", "wheel" ]
requires = [ "hatchling" ]

[project]
name = "albucore"
Expand Down Expand Up @@ -48,19 +48,11 @@ contrib-headless = ["opencv-contrib-python-headless>=4.13.0.90"]
gui = ["opencv-python>=4.13.0.90"]
headless = ["opencv-python-headless>=4.13.0.90"]

[tool.setuptools]
packages = { find = { include = [
"albucore*",
], exclude = [
"tests",
"benchmark",
"benchmarks",
] } }

package-data = { albucore = [ "py.typed" ] }
[tool.hatch.build.targets.wheel]
packages = ["albucore"]
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With hatchling, non-.py package data is not always included unless explicitly selected by the wheel file selection rules. To avoid accidentally dropping PEP 561 typing support, explicitly include albucore/py.typed in the wheel build configuration (or configure wheel include/artifacts/shared-data accordingly) so the marker file is guaranteed to be present in the built wheel.

Suggested change
packages = ["albucore"]
packages = ["albucore"]
include = ["albucore/py.typed"]

Copilot uses AI. Check for mistakes.

[tool.setuptools.exclude-package-data]
"*" = [ "tests*", "benchmarks*", "benchmark*", "conda.recipe*" ]
[tool.hatch.build.targets.sdist]
exclude = ["tests", "benchmarks", "benchmark", "conda.recipe"]
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[tool.hatch.build.targets.sdist].exclude entries look like plain directory names; hatchling expects glob patterns, so this may not exclude the directory contents from the sdist. Consider switching these to directory globs (e.g., tests/**, benchmarks/**, etc.) so unwanted sources are reliably excluded from the sdist artifact.

Suggested change
exclude = ["tests", "benchmarks", "benchmark", "conda.recipe"]
exclude = ["tests/**", "benchmarks/**", "benchmark/**", "conda.recipe/**"]

Copilot uses AI. Check for mistakes.

[tool.ruff]
# Exclude a variety of commonly ignored directories.
Expand Down
Loading