Skip to content

Commit 832b537

Browse files
committed
build: don't hardcode _libs directory in CMakeLists
The fact that pbk expects the bitcoinkernel shared library in the _libs directory, is part of the scikit-build-core pipeline. Take it out of the CMakeLists logic, and update callsites/pyproject.toml to properly set the install location.
1 parent af8d259 commit 832b537

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

.github/workflows/pytest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
run: |
3232
cmake -B build
3333
cmake --build build -j
34-
cmake --install build --strip
34+
cmake --install build --prefix build/_libs/
3535
3636
- name: Save lib cache
3737
if: steps.cache-lib.outputs.cache-hit != 'true'

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
run: |
6767
cmake -B build ${{ matrix.cmake_args }}
6868
cmake --build build -j
69-
cmake --install build
69+
cmake --install build --prefix build/_libs/
7070
7171
- name: Save lib cache
7272
if: steps.cache-lib.outputs.cache-hit != 'true'

CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ cmake_minimum_required(VERSION 3.22)
22
project(py-bitcoinkernel
33
VERSION 0.1)
44

5-
# Set install prefix to be relative to the build directory
6-
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}")
7-
85
include(ExternalProject)
96
include(GNUInstallDirs)
107

@@ -89,6 +86,6 @@ set_target_properties(bitcoinkernel PROPERTIES
8986
)
9087

9188
install(FILES "${BITCOINKERNEL_PATH}"
92-
DESTINATION "_libs"
89+
DESTINATION "."
9390
COMPONENT Kernel
9491
)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ test-extras = ["test"]
2424
[tool.scikit-build]
2525
cmake.version = "CMakeLists.txt"
2626
wheel.packages = ["src/pbk"]
27-
wheel.install-dir = "pbk"
27+
wheel.install-dir = "pbk/_libs"
2828
sdist.include = [
2929
"depend/bitcoin/src/univalue/lib/**", # Otherwise this doesn't get included in the sdist
3030
]

0 commit comments

Comments
 (0)