-
-
Notifications
You must be signed in to change notification settings - Fork 12
chore(build): migrate from setuptools to hatchling #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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" | ||||||
|
|
@@ -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"] | ||||||
|
|
||||||
| [tool.setuptools.exclude-package-data] | ||||||
| "*" = [ "tests*", "benchmarks*", "benchmark*", "conda.recipe*" ] | ||||||
| [tool.hatch.build.targets.sdist] | ||||||
| exclude = ["tests", "benchmarks", "benchmark", "conda.recipe"] | ||||||
|
||||||
| exclude = ["tests", "benchmarks", "benchmark", "conda.recipe"] | |
| exclude = ["tests/**", "benchmarks/**", "benchmark/**", "conda.recipe/**"] |
There was a problem hiding this comment.
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.typedin the wheel build configuration (or configure wheelinclude/artifacts/shared-dataaccordingly) so the marker file is guaranteed to be present in the built wheel.