Skip to content

Commit 2e81dc7

Browse files
committed
clearnet: migrate to uv shebang
1 parent b63622d commit 2e81dc7

File tree

5 files changed

+1543
-2
lines changed

5 files changed

+1543
-2
lines changed

clearnet/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@ This plugin aims to prefer usage over clearnet connections.
33
It does so by disconnecing TOR connections when there are known and usable
44
clearnet addresses.
55

6+
# Installation
7+
8+
You need [uv](https://docs.astral.sh/uv/getting-started/installation/) to run this
9+
plugin like a binary. After `uv` is installed you can simply run
10+
11+
```
12+
lightning-cli plugin start /path/to/clearnet.py
13+
```
14+
15+
For general plugin installation instructions see the repos main
16+
[README.md](https://github.com/lightningd/plugins/blob/master/README.md#Installation)
17+
618
# Options
719

820
# Methods

clearnet/clearnet.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
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+
# "pyln-client>=24.11"
7+
# ]
8+
# ///
9+
210
import socket
311
from contextlib import closing
412

clearnet/pyproject.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[project]
2+
name = "clearnet"
3+
version = "0.1.0"
4+
description = "Prefer usage over clearnet connections"
5+
readme = "README.md"
6+
requires-python = ">=3.9.2"
7+
8+
dependencies = ["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+
]

clearnet/requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)