You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/contribute-to-core-lightning/contributor-workflow.md
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,37 @@ It will also print out (to stderr) the gdb command for manual connection. The s
35
35
make -j$(nproc)
36
36
```
37
37
38
+
## Building Python Packages
39
+
40
+
Core Lightning includes several Python packages in the workspace that can be built individually or all at once:
41
+
42
+
```shell
43
+
# Build all Python packages
44
+
make pyln-build-all
45
+
46
+
# Build individual packages
47
+
make pyln-build-client
48
+
make pyln-build-proto
49
+
make pyln-build-testing
50
+
make pyln-build-grpc-proto
51
+
52
+
# Build bolt specification packages
53
+
make pyln-build-bolt1
54
+
make pyln-build-bolt2
55
+
make pyln-build-bolt4
56
+
make pyln-build-bolt7
57
+
58
+
# Build wss-proxy plugin
59
+
make pyln-build-wss-proxy
60
+
```
61
+
62
+
You can also build packages directly with uv:
63
+
64
+
```shell
65
+
uv build contrib/pyln-client/
66
+
uv build contrib/pyln-proto/
67
+
```
68
+
38
69
## Making BOLT Modifications
39
70
40
71
All of code for marshalling/unmarshalling BOLT protocol messages is generated directly from the spec. These are pegged to the BOLTVERSION, as specified in `Makefile`.
Note: For testing that requires grpc functionality, ensure you have the grpc extras installed: `uv sync --extra grpc`
43
45
44
46
You can also append `-k TESTNAME` to run a single test. Environment variables `DEBUG_SUBD=[<path>:]<subdaemon>` (where path must match the end of the lightning daemon path, for matching only one of several lightningd instances) and `TIMEOUT=<seconds>` can be useful for debugging subdaemons on individual tests, and `DEBUG_LIGHTNINGD` for attaching a debugger to each `lightningd` instance created.
45
47
46
48
Alternatively, to run a specific test via the `Makefile`, you can specify the test by setting the environment variable `PYTEST_TESTS`:
47
49
48
50
`PYTEST_TESTS="tests/test_askrene.py::test_layers" make pytest`
51
+
52
+
Or run tests directly with uv:
53
+
54
+
`uv run python -m pytest tests/test_askrene.py::test_layers -v`
49
55
50
56
-**pylightning tests** - will check contrib pylightning for codestyle and run the tests in `contrib/pylightning/tests` afterwards:
Copy file name to clipboardExpand all lines: doc/developers-guide/app-development/grpc.md
+2-10Lines changed: 2 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,18 +35,10 @@ The gRPC interface is described in the [protobuf file](https://github.com/Elemen
35
35
36
36
In this tutorial, we walk through the steps for Python, however they are mostly the same for other languages. For instance, if you're developing in Rust, use [`tonic-build`](https://docs.rs/tonic-build/latest/tonic_build/) to generate the bindings. For other languages, see the official [gRPC docs](https://grpc.io/docs/languages/) on how to generate gRPC client library for your specific language using the protobuf file.
37
37
38
-
We start by downloading the dependencies and `protoc` compiler:
39
-
40
-
```shell
41
-
pip install grpcio-tools
42
-
```
43
-
44
-
45
-
46
-
Next we generate the bindings in the current directory:
38
+
We generate the bindings in the current directory:
(If installing `poetry` with `pip` as above fails, try installing it with the [official poetry installer](https://python-poetry.org/docs/#installing-with-the-official-installer).)
85
+
After installing uv, restart your shell or run `source ~/.bashrc` to ensure `uv` is in your PATH.
86
86
87
87
88
88
If you don't have Bitcoin installed locally you'll need to install that as well. It's now available via [snapd](https://snapcraft.io/bitcoin-core).
@@ -113,7 +113,6 @@ For development or running tests, get additional dependencies:
0 commit comments