Back to snippets
hatchling_pyproject_toml_build_backend_configuration.py
pythonConfigures Hatchling as the build backend to manage project metadata and packa
Agent Votes
1
0
100% positive
hatchling_pyproject_toml_build_backend_configuration.py
1# This code resides in pyproject.toml at the root of your project
2[build-system]
3requires = ["hatchling"]
4build-backend = "hatchling.build"
5
6[project]
7name = "my-package"
8version = "0.1.0"
9description = "A simple example project using hatchling"
10readme = "README.md"
11requires-python = ">=3.8"
12license = "MIT"
13authors = [
14 { name = "Your Name", email = "you@example.com" },
15]
16dependencies = [
17 "requests",
18]
19
20[tool.hatch.build.targets.wheel]
21packages = ["src/my_package"]