Skip to content

Commit 2504741

Browse files
committed
zmq: migrate to uv shebang
1 parent fc69229 commit 2504741

File tree

5 files changed

+1537
-9
lines changed

5 files changed

+1537
-9
lines changed

zmq/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@ This module forwards [notifications](https://github.com/ElementsProject/lightnin
55
The usage and setup mimics [similar functionality in `bitcoind`](https://github.com/bitcoin/bitcoin/blob/master/doc/zmq.md) for opting-in to notifications and selecting [high water mark (ZMQ\_HWM)](http://api.zeromq.org/2-1:zmq-setsockopt) preferences.
66

77

8-
## Dependencies
8+
## Installation
99

10-
[Twisted](https://twistedmatrix.com) and [txZMQ](https://pypi.org/project/txZMQ/) are used by this plugin.
10+
You need [uv](https://docs.astral.sh/uv/getting-started/installation/) to run this
11+
plugin like a binary. After `uv` is installed you can simply run
1112

1213
```
13-
$ sudo pip3 install -r requirements
14+
lightning-cli plugin start /path/to/cl-zmq.py
1415
```
1516

16-
## Installation
17-
1817
For general plugin installation instructions see the repos main
1918
[README.md](https://github.com/lightningd/plugins/blob/master/README.md#Installation)
2019

zmq/cl-zmq.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
#!/usr/bin/env python3
1+
#!/usr/bin/env -S uv run --script
2+
3+
# /// script
4+
# requires-python = ">=3.9.2"
5+
# dependencies = [
6+
# "Twisted>=20.3.0",
7+
# "txzmq==0.8.2",
8+
# "pyln-client>=24.11",
9+
# ]
10+
# ///
11+
212
# Copyright (c) 2019 lightningd
313
# Distributed under the BSD 3-Clause License, see the accompanying file LICENSE
414

zmq/pyproject.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[project]
2+
name = "zmq"
3+
version = "0.1.0"
4+
description = "Forwards notifications to ZeroMQ endpoints depending on configuration"
5+
readme = "README.md"
6+
requires-python = ">=3.9.2"
7+
8+
dependencies = ["Twisted>=20.3.0", "txzmq==0.8.2", "pyln-client>=24.11"]
9+
10+
[dependency-groups]
11+
dev = [
12+
"pytest>=7.4,<9",
13+
"pytest-xdist>=3.7,<4",
14+
"pytest-timeout>=2.4,<3",
15+
"pyln-testing>=24.11.1",
16+
"pyln-client>=24.11.1",
17+
"pyln-proto>=24.11.1",
18+
]

zmq/requirements.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)