Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ jobs:
run: bash ./scripts/generate_bindings.sh

- name: "Build wheel"
run: python -m build --wheel
run: uv build

- name: "Install wheel"
run: pip install ./dist/*.whl
run: uv pip install ./dist/*.whl

- name: "Run tests"
run: python -m unittest -v
16 changes: 15 additions & 1 deletion payjoin-ffi/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,16 @@ build-backend = "setuptools.build_meta"
name = "payjoin"
description = "The Python language bindings for the Payjoin Dev Kit"
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.9"
license = "MIT"
dynamic = ["version"]
dependencies = [
"build==1.3.0",
"semantic-version==2.9.0",
"setuptools==78.1.1",
"typing-extensions==4.0.1",
"wheel==0.38.4",
]

[tool.setuptools]
packages = ["payjoin"]
Expand All @@ -19,3 +26,10 @@ include-package-data = true
pythonpath = [
"."
]

[dependency-groups]
dev = [
"httpx==0.28.1",
"toml==0.10.2",
"yapf==0.43.0",
]
3 changes: 0 additions & 3 deletions payjoin-ffi/python/requirements-dev.txt

This file was deleted.

5 changes: 0 additions & 5 deletions payjoin-ffi/python/requirements.txt

This file was deleted.

4 changes: 0 additions & 4 deletions payjoin-ffi/python/scripts/generate_bindings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@ echo "Running on $OS"
if [[ "$OS" == "Darwin" ]]; then
LIBNAME=libpayjoin_ffi.dylib
python3 --version
pip install -r requirements.txt -r requirements-dev.txt
elif [[ "$OS" == "Linux" ]]; then
LIBNAME=libpayjoin_ffi.so
PYBIN=$(dirname $(which python))
PYBIN="$PYBIN"
${PYBIN}/python --version
${PYBIN}/pip install -r requirements.txt -r requirements-dev.txt
else
echo "Unsupported os: $OS"
exit 1
Expand All @@ -28,7 +26,6 @@ cargo run --features _test-utils --profile dev --bin uniffi-bindgen generate --l

if [[ "$OS" == "Darwin" ]]; then
echo "Generating native binaries..."
rustup target add aarch64-apple-darwin x86_64-apple-darwin
# This is a test script the actual release should not include the test utils feature
cargo build --profile dev --target aarch64-apple-darwin --features _test-utils &
cargo build --profile dev --target x86_64-apple-darwin --features _test-utils &
Expand All @@ -41,7 +38,6 @@ if [[ "$OS" == "Darwin" ]]; then

else
echo "Generating native binaries..."
rustup target add x86_64-unknown-linux-gnu
# This is a test script the actual release should not include the test utils feature
cargo build --profile dev --target x86_64-unknown-linux-gnu --features _test-utils

Expand Down
10 changes: 6 additions & 4 deletions payjoin-ffi/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
from setuptools import setup
import toml

# Read version from Cargo.toml
cargo_toml_path = os.path.join(os.path.dirname(__file__), '..', 'Cargo.toml')
cargo_toml = toml.load(cargo_toml_path)
version = cargo_toml['package']['version']
# # Read version from Cargo.toml
# cargo_toml_path = os.path.join(os.path.dirname(__file__), '..', 'Cargo.toml')
# cargo_toml = toml.load(cargo_toml_path)
# version = cargo_toml['package']['version']

version = "0.24.0"

LONG_DESCRIPTION = """# payjoin
This repository creates libraries for various programming languages, all using the Rust-based [Payjoin](https://github.com/payjoin/rust-payjoin)
Expand Down
294 changes: 294 additions & 0 deletions payjoin-ffi/python/uv.lock

Large diffs are not rendered by default.

Loading