Skip to content

Commit 36ec63a

Browse files
committed
doc: Unify Python optional module and test dependency documentation
The current documentation combine two different approaches: OS-specific notes and OS-agnostic Python-specific notes. This has multiple issues: 1. OS-specific notes miss the `pycapnp` module. 2. `python3-zmq` is a package name in some Linux distros, rather than a Unix-wide convention. 3. Installing `pyzmq` from PyPI works in general, not only on macOS. As the functional test framework is Python-based, this consolidates the documentation in Python-focused notes fixing the mentioned issues.
1 parent 39502b4 commit 36ec63a

7 files changed

Lines changed: 24 additions & 55 deletions

File tree

doc/build-freebsd.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,8 @@ pkg install libzmq4 pkgconf
7070
```
7171

7272
#### Test Suite Dependencies
73-
There is an included test suite that is useful for testing code changes when developing.
74-
To run the test suite (recommended), you will need to have Python 3 installed:
7573

76-
```bash
77-
pkg install python3 databases/py-sqlite3 net/py-pyzmq lsof
78-
```
79-
---
74+
See [`test/README.md`](/test/README.md#dependencies-and-prerequisites).
8075

8176
## Building Bitcoin Core
8277

doc/build-netbsd.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,7 @@ pkgin install zeromq pkgconf
7373

7474
#### Test Suite Dependencies
7575

76-
There is an included test suite that is useful for testing code changes when developing.
77-
To run the test suite (recommended), you will need to have Python 3 installed:
78-
79-
```bash
80-
pkgin install python313 py313-zmq lsof
81-
```
82-
83-
When the `lsof` binary package was built for a different point release, it might be necessary to force its installation as follows:
84-
85-
```bash
86-
echo "CHECK_OSABI=no" >> /etc/pkg_install.conf
87-
pkgin install lsof
88-
```
76+
See [`test/README.md`](/test/README.md#dependencies-and-prerequisites).
8977

9078
## Building Bitcoin Core
9179

doc/build-openbsd.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,8 @@ pkg_add zeromq
7070
```
7171

7272
#### Test Suite Dependencies
73-
There is an included test suite that is useful for testing code changes when developing.
74-
To run the test suite (recommended), you will need to have Python 3 installed:
7573

76-
```bash
77-
pkg_add python py3-zmq # Select the newest version of the python package if necessary.
78-
```
74+
See [`test/README.md`](/test/README.md#dependencies-and-prerequisites).
7975

8076
## Building Bitcoin Core
8177

doc/build-osx.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,7 @@ For more information on ZMQ, see: [zmq.md](zmq.md)
121121

122122
#### Test Suite Dependencies
123123

124-
There is an included test suite that is useful for testing code changes when developing.
125-
To run the test suite (recommended), you will need to have Python 3 installed:
126-
127-
``` bash
128-
brew install python
129-
```
124+
See [`test/README.md`](/test/README.md#dependencies-and-prerequisites).
130125

131126
---
132127

doc/build-unix.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,7 @@ be compiled in disable-wallet mode with:
8888
In this case there is no dependency on SQLite.
8989

9090
Mining is also possible in disable-wallet mode using the `getblocktemplate` RPC call.
91+
92+
### Test Suite Dependencies
93+
94+
See [`test/README.md`](/test/README.md#dependencies-and-prerequisites).

doc/build-windows-msvc.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,9 @@ This installs:
3232
After installation, the commands in this guide should be executed in "Developer PowerShell for VS" or "Developer Command Prompt for VS".
3333
The former is assumed hereinafter.
3434

35-
#### Python
35+
#### Test Suite Dependencies
3636

37-
Python is required for running the test suite.
38-
39-
To install Python, run:
40-
41-
```powershell
42-
winget install python3
43-
```
37+
See [`test/README.md`](/test/README.md#dependencies-and-prerequisites).
4438

4539
### 2. Clone Bitcoin Repository
4640

test/README.md

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,27 +29,24 @@ See [/doc/fuzzing.md](/doc/fuzzing.md)
2929

3030
### Dependencies and prerequisites
3131

32-
The ZMQ functional test requires a python ZMQ library. To install it:
32+
The functional tests require Python to be installed. For the minimum required Python version, refer to [Dependencies](/doc/dependencies.md#build-1).
3333

34-
- on Unix, run `sudo apt-get install python3-zmq`
35-
- on mac OS, run `pip3 install pyzmq`
34+
#### Optional dependencies
3635

37-
The IPC functional test requires a python IPC library. `pip3 install pycapnp` may work, but if not, install it from source:
36+
Some tests require optional dependencies: Python modules and system utilities.
37+
They can be installed with any suitable tool, like the system package manager, `pip` in a virtual environment, or `uv`.
3838

39-
```sh
40-
git clone -b v2.2.1 https://github.com/capnproto/pycapnp
41-
pip3 install ./pycapnp
42-
```
43-
44-
If that does not work, try adding `-C force-bundled-libcapnp=True` to the `pip` command.
45-
Depending on the system, it may be necessary to install and run in a venv:
39+
If a dependency is not installed, the tests will be skipped rather than failed.
4640

47-
```sh
48-
python -m venv venv
49-
git clone -b v2.2.1 https://github.com/capnproto/pycapnp
50-
venv/bin/pip3 install ./pycapnp -C force-bundled-libcapnp=True
51-
venv/bin/python3 build/test/functional/interface_ipc.py
52-
```
41+
| Package manager | Python | sqlite3 | zmq | capnp | lsof |
42+
| :--- | :--- | :--- | :--- | :--- | :--- |
43+
| **pip** | n/a | n/a | `pyzmq` | `pycapnp` | n/a |
44+
| **Debian/Ubuntu**<br>(`apt`) | `python3` | n/a | `python3-zmq` | n/a | n/a |
45+
| **macOS**<br>(`brew`) | `python3` | n/a | n/a | n/a | n/a |
46+
| **Windows**<br>(`winget`) | `python3` | n/a | n/a | n/a | n/a |
47+
| **FreeBSD**<br>(`pkg`) | `python3` | `databases/py-sqlite3` | `net/py-pyzmq` | n/a | `lsof` |
48+
| **NetBSD**<br>(`pkgin`) | `python313` | n/a | `py313-zmq` | n/a | `lsof` |
49+
| **OpenBSD**<br>(`pkg_add`) | `python` | n/a | `py3-zmq` | n/a | n/a |
5350

5451
#### UTF-8 mode
5552

0 commit comments

Comments
 (0)