Skip to content

Commit 9e40c70

Browse files
committed
WIP: Add python packaging
1 parent f024b4c commit 9e40c70

File tree

5 files changed

+33
-2
lines changed

5 files changed

+33
-2
lines changed

bindings/python/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include src/ldk_node/libldk_node.dylib

bindings/python/pyproject.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[project]
2+
name = "ldk_node"
3+
version = "0.1-alpha.1"
4+
authors = [
5+
{ name="Elias Rohrer", email="[email protected]" },
6+
]
7+
description = "A ready-to-go Lightning node library built using LDK and BDK."
8+
readme = "README.md"
9+
requires-python = ">=3.6"
10+
classifiers = [
11+
"Topic :: Software Development :: Libraries",
12+
"Topic :: Security :: Cryptography",
13+
"License :: OSI Approved :: MIT License",
14+
"License :: OSI Approved :: Apache Software License",
15+
"Programming Language :: Python :: 3",
16+
]
17+
18+
[project.urls]
19+
"Homepage" = "https://lightningdevkit.org/"
20+
"Github" = "https://github.com/lightningdevkit/ldk-node"
21+
"Bug Tracker" = "https://github.com/lightningdevkit/ldk-node/issues"

bindings/python/setup.cfg

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[options]
2+
packages = find:
3+
package_dir =
4+
= src
5+
include_package_data = True
6+
7+
[options.packages.find]
8+
where = src
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from ldk_node import *
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
2-
BINDINGS_DIR="./bindings/python"
2+
BINDINGS_DIR="./bindings/python/src/ldk_node"
33
UNIFFI_BINDGEN_BIN="cargo run --features=uniffi/cli --bin uniffi-bindgen"
44

5-
cargo build --release --features uniffi || exit 1
5+
cargo build --profile release-smaller --features uniffi || exit 1
66
$UNIFFI_BINDGEN_BIN generate bindings/ldk_node.udl --language python -o "$BINDINGS_DIR" || exit 1
77
cp ./target/release/libldk_node.dylib "$BINDINGS_DIR"/libldk_node.dylib || exit 1

0 commit comments

Comments
 (0)