Skip to content

Commit 0ba897a

Browse files
committed
doc: document new PyPI / wheel installation
1 parent 367399c commit 0ba897a

File tree

1 file changed

+43
-14
lines changed

1 file changed

+43
-14
lines changed

README.md

Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,51 @@ In its current alpha state, it is primarily intended as a tool to:
2828

2929
## Installation
3030

31+
There are two main ways to install `py-bitcoinkernel`:
32+
1) Installing a pre-compiled wheel from PyPI, if it is available for
33+
your platform. This is the fastest way to install `py-bitcoinkernel`,
34+
and does not introduce any further dependencies. This approach
35+
requires you to trust the wheel build system.
36+
2) Installing from source and letting `pip` compile the dependencies
37+
locally. This allows you to compile `libbitcoinkernel` from source,
38+
and is the only way to install `py-bitcoinkernel` on platforms where
39+
a pre-compiled wheel is not available. It is significantly slower than
40+
installing a wheel, and requires a number of dependencies to be
41+
installed.
42+
43+
### Install from wheel
44+
45+
To install a pre-compiled wheel from PyPI, simply run:
46+
47+
```
48+
pip install --pre py-bitcoinkernel
49+
```
50+
51+
### Install from source
52+
53+
You can clone this repository and run:
54+
55+
```
56+
pip install .
57+
```
58+
59+
Alternatively, you can install the source distribution from PyPI:
60+
61+
```
62+
pip install --pre py-bitcoinkernel --no-binary :all:
63+
```
64+
65+
> [!NOTE]
66+
> When installing from source, `pip` will automatically compile
67+
> `libbitcoinkernel` from the bundled source code in `depend/bitcoin/`.
68+
> This process may take a while. To inspect the build progress, add -`v`
69+
> to your `pip` command, e.g. `pip install . -v`.
70+
3171
### Requirements
3272

33-
This project requires:
34-
- Python 3.10+ and `pip`
73+
This project requires Python 3.10+ and `pip`.
74+
75+
When installing from source, additional requirements apply:
3576
- The minimum system requirements, build requirements and dependencies
3677
to compile `libbitcoinkernel` from source. See Bitcoin Core's
3778
documentation
@@ -42,18 +83,6 @@ This project requires:
4283
- Note: `libevent` is a required dependency for Bitcoin Core, but not
4384
for `libbitcoinkernel`.
4485

45-
To install `py-bitcoinkernel`, simply clone this repo, (optionally
46-
create and activate a virtual environment), and install with `pip`:
47-
48-
```
49-
pip install .
50-
```
51-
52-
> [!NOTE]
53-
> `pip` will automatically compile `libbitcoinkernel` from the bundled
54-
> source code in `depend/bitcoin/`. This process may take a while. To
55-
> inspect the build progress, run `pip install . -v`.
56-
5786
## Usage
5887

5988
> [!WARNING]

0 commit comments

Comments
 (0)