Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
9 changes: 0 additions & 9 deletions .hatch_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,13 @@

class MetaDataHook(MetadataHookInterface):
def update(self, metadata: dict[str, t.Any]) -> None:
about = load_about()
metadata["version"] = about["__package_version__"]
metadata["dependencies"] = load_requirements("base.in")
metadata["optional-dependencies"] = {
"dev": load_requirements("dev.txt"),
"full": load_requirements("plugins.txt"),
}


def load_about() -> dict[str, str]:
about: dict[str, str] = {}
with open(os.path.join(HERE, "tutor", "__about__.py"), "rt", encoding="utf-8") as f:
exec(f.read(), about) # pylint: disable=exec-used
return about


def load_requirements(filename: str) -> list[str]:
requirements = []
with open(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- [Chore] Remove unnecessary hatch definition for version. (by @mlabeeb03)
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ Community = "https://discuss.openedx.org/tag/tutor"
[tool.hatch.metadata.hooks.custom]
path = ".hatch_build.py"

[tool.hatch.version]
path = "tutor/__about__.py"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
Expand Down