Migrate the build backend to hatchling (#258)

* Update build backend to hatchling

* Update pyproject.toml

* Add comment on versioning

* Update pyproject.toml

* Update pyproject.toml

* Update pyproject.toml

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Jeongwon Kim
2025-10-05 11:21:47 +09:00
committed by GitHub
parent 56e967d719
commit 227285ed81
2 changed files with 25 additions and 21 deletions

View File

@@ -1,16 +0,0 @@
exclude micropip/_vendored/packaging/.github/*
exclude micropip/_vendored/packaging/docs/*
exclude micropip/_vendored/packaging/tasks/*
exclude micropip/_vendored/packaging/tests/*
exclude micropip/_vendored/packaging/.pre-commit-config.yaml
exclude micropip/_vendored/packaging/.readthedocs.yml
exclude micropip/_vendored/packaging/CHANGELOG.rst
exclude micropip/_vendored/packaging/CONTRIBUTING.rst
exclude micropip/_vendored/packaging/noxfile.py
exclude micropip/_vendored/packaging/pyproject.toml
include micropip/_vendored/packaging/LICENSE
include micropip/_vendored/packaging/LICENSE.APACHE
include micropip/_vendored/packaging/LICENSE.BSD
include micropip/_vendored/packaging/README.rst

View File

@@ -31,13 +31,33 @@ test = [
[build-system]
requires = ["setuptools>=42", "setuptools_scm[toml]>=6.2", "wheel"]
requires = ["hatchling", "hatch-vcs"]
build-backend = "setuptools.build_meta"
build-backend = "hatchling.build"
# Evable versioning via setuptools_scm
[tool.setuptools_scm]
write_to = "micropip/_version.py"
# Versioning via hatch-vcs
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "micropip/_version.py"
[tool.hatch.build.targets.sdist]
exclude = [
"micropip/_vendored/packaging/.git",
"micropip/_vendored/packaging/.github/**",
"micropip/_vendored/packaging/.gitignore",
"micropip/_vendored/packaging/docs/**",
"micropip/_vendored/packaging/tasks/**",
"micropip/_vendored/packaging/tests/**",
"micropip/_vendored/packaging/.pre-commit-config.yaml",
"micropip/_vendored/packaging/.readthedocs.yml",
"micropip/_vendored/packaging/CHANGELOG.rst",
"micropip/_vendored/packaging/CONTRIBUTING.rst",
"micropip/_vendored/packaging/noxfile.py",
"micropip/_vendored/packaging/pyproject.toml",
"micropip/_vendored/packaging/SECURITY.md",
]
[tool.ruff]
exclude = ["micropip/_vendored/"]