build: Add hatch_build in sdist to fix installation issues

This commit is contained in:
Syed Muhammad Dawoud Sheraz Ali 2025-03-12 11:50:50 +05:00
parent 1465402bfa
commit ef8cca3d23
2 changed files with 10 additions and 2 deletions

View File

@ -0,0 +1 @@
- [Improvement] Add hatch_build.py in sdist target to fix the installation issues (by @dawoudsheraz)

View File

@ -29,7 +29,13 @@ classifiers = [
dependencies = [
"tutor>=19.0.0,<20.0.0",
]
optional-dependencies = { dev = ["tutor[dev]>=19.0.0,<20.0.0"] }
[project.optional-dependencies]
dev = [
"tutor[dev]>=19.0.0,<20.0.0",
"black",
"pylint"
]
# These fields will be set by hatch_build.py
dynamic = ["version"]
@ -57,7 +63,8 @@ packages = ["tutornotes"]
[tool.hatch.build.targets.sdist]
# Disable strict naming, otherwise twine is not able to detect name/version
strict-naming = false
include = [ "/tutornotes"]
include = [ "/tutornotes", ".hatch_build.py"]
exclude = ["tests*"]
[project.entry-points."tutor.plugin.v1"]
notes = "tutornotes.plugin"