Skip to content

Commit 61aebfd

Browse files
committed
Add python packaging
1 parent 1716da5 commit 61aebfd

File tree

5 files changed

+41
-3
lines changed

5 files changed

+41
-3
lines changed

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: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[options]
2+
packages = find:
3+
package_dir =
4+
= src
5+
include_package_data = True
6+
7+
[options.packages.find]
8+
where = src
9+
10+
[options.package_data]
11+
ldk_node =
12+
*.so
13+
*.dylib
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from ldk_node.ldk_node import *

scripts/python_create_package.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
cd bindings/python || exit 1
3+
python3 -m build
Lines changed: 3 additions & 3 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
7-
cp ./target/release/libldk_node.dylib "$BINDINGS_DIR"/libldk_node.dylib || exit 1
7+
cp ./target/release-smaller/libldk_node.dylib "$BINDINGS_DIR"/libldk_node.dylib || exit 1

0 commit comments

Comments
 (0)