Move bindings to langs directory

This commit is contained in:
Ross Savage
2024-05-21 15:21:28 +02:00
parent cc7a6efd27
commit c6c5755973
119 changed files with 1 additions and 1 deletions

5
lib/bindings/langs/python/.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
src/breez_liquid_sdk/*
!src/breez_liquid_sdk/__init__.py
*.egg-info
build
dist

View File

@@ -0,0 +1,37 @@
# Breez Liquid SDK bindings for Python
## Usage
```
pip install breez_liquid_sdk
```
``` python
import breez_liquid_sdk
```
## Python Package
Run the GitHub workflow 'Publish Python Bindings' when creating a new release of Breez Liquid SDK.
It will create wheels for the following Python versions and Platforms and upload them to [PyPi.org](https://pypi.org/project/breez-liquid-sdk/).
### Supported Wheels
| | GNU/Linux amd64 | GNU/Linux arm64v8 | macOS x86_64 | macOS aarch64 | Windows x86_64 | Windows 32 |
|-----------------|-----------------|-------------------|--------------|---------------|----------------|------------|
| **Python 3.8** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| **Python 3.9** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| **Python 3.10** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| **Python 3.11** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| **Python 3.12** | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
## Building Manually
To build the package manually inside this directory use the supplied `makefile`:
``` shell
make darwin # builds the package for macos
make linux # builds the package for linux
```
The artifacts will be placed in `src/breez_liquid_sdk/`.

View File

@@ -0,0 +1,13 @@
.PHONY: init
init:
make -C ../ init
darwin:
make -C ../ python-darwin
cp ../ffi/python/breez_liquid_sdk.py src/breez_liquid_sdk
cp ../ffi/python/libbreez_liquid_sdk_bindings.dylib src/breez_liquid_sdk
linux:
make -C ../ python-linux
cp ../ffi/python/breez_liquid_sdk.py src/breez_liquid_sdk
cp ../ffi/python/libbreez_liquid_sdk_bindings.so src/breez_liquid_sdk

View File

@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

View File

@@ -0,0 +1,29 @@
#!/usr/bin/env python
from setuptools import setup
LONG_DESCRIPTION = """# Breez Liquid SDK
Python language bindings for the [Breez Liquid SDK](https://github.com/breez/breez-liquid-sdk).
## Installing
```shell
pip install breez_liquid_sdk
```
"""
setup(
name="breez_liquid_sdk",
version="0.2.7.dev9",
description="Python language bindings for the Breez Liquid SDK",
long_description=LONG_DESCRIPTION,
long_description_content_type="text/markdown",
packages=["breez_liquid_sdk"],
package_dir={"breez_liquid_sdk": "./src/breez_liquid_sdk"},
include_package_data=True,
package_data={"breez_liquid_sdk": ["*.dylib", "*.so", "*.dll"]},
url="https://github.com/breez/breez-liquid-sdk",
author="Breez <contact@breez.technology>",
license="MIT",
has_ext_modules=lambda: True,
)

View File

@@ -0,0 +1 @@
from breez_liquid_sdk.breez_liquid_sdk import *