Skip to content

Commit 6986fe2

Browse files
committed
Back to pipx as a task runner, since it seems to be already installed on some images
1 parent e7cf64b commit 6986fe2

2 files changed

Lines changed: 13 additions & 9 deletions

File tree

.github/workflows/build-steps.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ jobs:
106106
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
107107
with:
108108
fetch-depth: '0'
109-
- name: Install uv
110-
uses: astral-sh/setup-uv@v5
111-
with:
112-
version: "0.6.13"
109+
- name: Install uv
110+
uses: astral-sh/setup-uv@v5
111+
with:
112+
version: "0.6.13"
113113
- name: Prepare ccache timestamp
114114
id: ccache_cache_keys
115115
shell: bash

src/cmake/pythonutils.cmake

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,25 +169,29 @@ macro (setup_python_module)
169169
# FIXME: is this the right location to use? the source gets copied to build/src
170170
set (_stub_gen "${CMAKE_SOURCE_DIR}/src/python/generate_stubs.py")
171171

172-
find_program (UV_EXE NAMES uv uv.exe)
172+
find_program (PIPX_EXE NAMES pipx pipx.exe)
173173

174-
if (NOT UV_EXE)
174+
if (NOT PIPX_EXE)
175175
# add_custom_command (
176176
# COMMAND ${Python3_EXECUTABLE} -m venv "${PYTHON_VENV_DIR}"
177177
# COMMAND ${PYTHON_VENV_EXE} -m pip install uv
178178
# OUTPUT "${PYTHON_VENV_DIR}/bin/activate"
179179
# COMMENT "Creating virtualenv at ${PYTHON_VENV_DIR}"
180180
# )
181+
message(INFO "Installing pipx")
181182
execute_process (
182183
COMMAND ${Python3_EXECUTABLE} -m venv "${PYTHON_VENV_DIR}"
183-
COMMAND ${PYTHON_VENV_EXE} -m pip install uv
184+
COMMAND ${PYTHON_VENV_EXE} -m pip install pipx
184185
COMMAND_ERROR_IS_FATAL ANY
185186
)
186-
find_program (UV_EXE NAMES uv uv.exe)
187+
find_program (PIPX_EXE NAMES pipx pipx.exe)
188+
if (NOT PIPX_EXE)
189+
message(FATAL_ERROR "Could not find or install pipx")
190+
endif()
187191
endif()
188192

189193
add_custom_command (
190-
COMMAND ${UV_EXE} run --python=${Python3_EXECUTABLE} ${_stub_gen} ${PYTHON_BUILD_SITE}
194+
COMMAND ${PIPX_EXE} run --python=${Python3_EXECUTABLE} ${_stub_gen} ${PYTHON_BUILD_SITE}
191195
OUTPUT ${_stub_file}
192196
DEPENDS ${_stub_gen}
193197
COMMENT "Creating python stubs")

0 commit comments

Comments
 (0)