Skip to content

Commit 09e7fa4

Browse files
committed
Switch Python build backend from setuptools to hatchling
Replace the split setuptools configuration (pyproject.toml + setup.cfg) with a unified hatchling-based setup. This adds a [build-system] section pointing to hatchling and a build hook (hatch_build.py) that marks wheels as platform-specific since we bundle native shared libraries. Hatchling includes all files in the package directory by default, which also fixes the missing *.dll glob that setup.cfg had for Windows. Bump requires-python from >=3.6 to >=3.8 as 3.6/3.7 are long EOL. Co-Authored-By: HAL 9000
1 parent 3aef2b3 commit 09e7fa4

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

bindings/python/hatch_build.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
2+
3+
4+
class CustomBuildHook(BuildHookInterface):
5+
def initialize(self, version, build_data):
6+
build_data["pure_python"] = False
7+
build_data["infer_tag"] = True

bindings/python/pyproject.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
[build-system]
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
4+
15
[project]
26
name = "ldk_node"
37
version = "0.7.0"
@@ -6,7 +10,7 @@ authors = [
610
]
711
description = "A ready-to-go Lightning node library built using LDK and BDK."
812
readme = "README.md"
9-
requires-python = ">=3.6"
13+
requires-python = ">=3.8"
1014
classifiers = [
1115
"Topic :: Software Development :: Libraries",
1216
"Topic :: Security :: Cryptography",
@@ -19,3 +23,6 @@ classifiers = [
1923
"Homepage" = "https://lightningdevkit.org/"
2024
"Github" = "https://github.com/lightningdevkit/ldk-node"
2125
"Bug Tracker" = "https://github.com/lightningdevkit/ldk-node/issues"
26+
27+
[tool.hatch.build.targets.wheel]
28+
packages = ["src/ldk_node"]

bindings/python/setup.cfg

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)