Skip to content

Commit 2976154

Browse files
committed
docs: add cross-platform build script commands to README
1 parent 79c16e9 commit 2976154

1 file changed

Lines changed: 43 additions & 9 deletions

File tree

‎README.md‎

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,71 @@ The Python language bindings for the [bitcoindevkit](https://github.com/bitcoind
44

55
See the [package on PyPI](https://pypi.org/project/bdkpython/).
66

7-
# Working with the submodule
7+
## Working with the submodule
88

99
This repository uses the bdk-ffi repository as a git submodule. Here are useful tips for working with the submodule:
1010

11-
1. When initially cloning the repo, the `bdk-ffi` submodule will be empty locally. You can intitiate/populate the directory by using the `just submodule-init` command.
11+
1. When initially cloning the repo, the `bdk-ffi` submodule will be empty locally. You can initiate/populate the directory by using the `just submodule-init` command.
1212
2. If you make local changes to the `bdk-ffi` directory while developing and want to hard delete all changes and return to the exact committed version hash of the bdk-ffi repo, use the `just submodule-reset` command.
1313

1414
## Local Testing and Usage
1515

16-
1. Run one of the build script (skip the submodule update if you are making local changes to the bdk-ffi submodule)
16+
1. Run one of the build scripts (skip the submodule update if you are making local changes to the `bdk-ffi` submodule)
1717
2. Sync dependencies with `uv`
1818
3. Create the wheel
1919
4. Install the library
2020
5. Run the tests
2121

22+
### 1. Build Script Commands
23+
24+
Run the build script corresponding to your operating system:
25+
26+
**Linux**:
27+
28+
```sh
29+
bash scripts/generate-linux.sh
30+
```
31+
32+
**macOS (Apple Silicon / ARM64)**:
33+
2234
```sh
23-
# If you made changes to the bdk-ffi submodule and wish to use those instead of the committed hash
24-
bash scripts/generate-macos-arm64.sh --skip-submodule-update
25-
# Otherwise
2635
bash scripts/generate-macos-arm64.sh
36+
```
37+
38+
**macOS (Intel / x86_64)**:
39+
40+
```sh
41+
bash scripts/generate-macos-x86_64.sh
42+
```
43+
44+
**Windows (Git Bash / MSYS2)**:
45+
46+
```sh
47+
bash scripts/generate-windows.sh
48+
```
49+
50+
*Note: Pass `--skip-submodule-update` if you are making local changes to `bdk-ffi` and wish to preserve them instead of resetting to the committed submodule hash.*
2751

52+
### 2–5. Setup, Build, Install & Test Commands
53+
54+
```sh
55+
# Sync dependencies with uv
2856
uv sync
57+
58+
# Create the wheel
2959
uv build --wheel -v
30-
uv pip install ./dist/bdkpython-<yourversion>.whl --force-reinstall
60+
61+
# Install the library
62+
uv pip install ./dist/bdkpython-*.whl --force-reinstall
63+
64+
# Run the tests
3165
uv run python -m unittest --verbose
3266
```
3367

3468
## Build HTML API Documentation (Optional)
3569

36-
6. Generate docs
37-
7. Build HTML Documentation
70+
1. Generate docs
71+
2. Build HTML Documentation
3872

3973
```sh
4074
uv run python ./docs/generate_docs.py

0 commit comments

Comments
 (0)