Skip to content

Commit

Permalink
WIP: Add python packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
tnull committed Jun 20, 2023
1 parent dd90f50 commit bbb4c15
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 2 deletions.
1 change: 1 addition & 0 deletions bindings/python/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include src/ldk_node/libldk_node.dylib
21 changes: 21 additions & 0 deletions bindings/python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[project]
name = "ldk_node"
version = "0.1-alpha.1"
authors = [
{ name="Elias Rohrer", email="dev@tnull.de" },
]
description = "A ready-to-go Lightning node library built using LDK and BDK."
readme = "README.md"
requires-python = ">=3.6"
classifiers = [
"Topic :: Software Development :: Libraries",
"Topic :: Security :: Cryptography",
"License :: OSI Approved :: MIT License",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
]

[project.urls]
"Homepage" = "https://lightningdevkit.org/"
"Github" = "https://github.com/lightningdevkit/ldk-node"
"Bug Tracker" = "https://github.com/lightningdevkit/ldk-node/issues"
8 changes: 8 additions & 0 deletions bindings/python/setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[options]
packages = find:
package_dir =
= src
include_package_data = True

[options.packages.find]
where = src
1 change: 1 addition & 0 deletions bindings/python/src/ldk_node/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from ldk_node import *
4 changes: 2 additions & 2 deletions scripts/uniffi_bindgen_generate_python.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
BINDINGS_DIR="./bindings/python"
BINDINGS_DIR="./bindings/python/src/ldk_node"
UNIFFI_BINDGEN_BIN="cargo run --features=uniffi/cli --bin uniffi-bindgen"

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

0 comments on commit bbb4c15

Please sign in to comment.