mirror of https://github.com/pyodide/pyodide.git
chore: use hatchling instead of setuptools (#4770)
This swaps out the build backend of pyodide-build for hatchling, which is simpler and faster. The difference in the SDists: This removes the zip directories entries, setup.cfg, and .egg-info directory and contents. It includes the .gitignore, since hatchling uses that to decide what to include by default. The difference in the wheel built from the SDist: The useless top_level.txt is gone and the license is in the licenses directory.
This commit is contained in:
parent
354e7a1864
commit
1b4660d8bd
|
@ -1,6 +1,6 @@
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = ["setuptools>=61.2"]
|
requires = ["hatchling"]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "hatchling.build"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "pyodide-build"
|
name = "pyodide-build"
|
||||||
|
@ -71,19 +71,10 @@ deploy = [
|
||||||
"moto",
|
"moto",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.setuptools]
|
[tool.hatch]
|
||||||
package-dir = {"" = "."}
|
version.path = "pyodide_build/__init__.py"
|
||||||
license-files = ["LICENSE"]
|
|
||||||
include-package-data = false
|
|
||||||
|
|
||||||
[tool.setuptools.packages.find]
|
[tool.hatch.build.targets.sdist]
|
||||||
where = ["."]
|
exclude = [
|
||||||
exclude = ["pyodide_build.tests*"]
|
"/pyodide_build/tests",
|
||||||
namespaces = true
|
]
|
||||||
|
|
||||||
[tool.setuptools.package-data]
|
|
||||||
"pyodide_build.tools" = ["*.ini", "*.cross"]
|
|
||||||
"pyodide_build.tools.cmake.Modules.Platform" = ["*.cmake"]
|
|
||||||
|
|
||||||
[tool.setuptools.dynamic]
|
|
||||||
version = {attr = "pyodide_build.__version__"}
|
|
||||||
|
|
Loading…
Reference in New Issue