Skip to content

Commit e96ef09

Browse files
authored
QoL: installation and dev workflow polish (#279)
* Add interactive `pecos setup` command for build environment setup * Move LLVM/CUDA/cuQuantum installs under ~/.pecos/deps/ with migration support * Add confirmation prompt with size display to pecos uninstall * Replace hand-rolled TOML parsing in LLVM config reader with toml crate * Clean up Justfile dependency recipes and fix naming inconsistencies * Add disk usage to pecos list, CUDA/cuQuantum status, and post-install hint * Remove temporary design doc used during development * Add --quiet flag to pecos setup, use it from build recipes * Update docs to reference new ~/.pecos/deps/ paths * Simplify check-cli recipe from 57 lines to 11 * Add pecos clean command for cache and tmp cleanup * Replace pecos rust fmt with direct cargo fmt in Justfile * Replace pecos rust check/clippy with direct cargo calls in Justfile * Replace more CLI wrappers with direct tool calls in Justfile * Reorganize Justfile with groups, hide internal recipes, reduce visible noise * Add quick-start guide to default recipe, add check-cli guards to all pecos-calling recipes * Fix sys-info to use proper CUDA/cuQuantum detection and show all deps * Add confirmation prompt to pecos upgrade * Fix LLVM installer using dir-creating path, preventing extraction rename * Update CI workflow to use new ~/.pecos/deps/llvm path * Clarify install skip message: --force installs locally even when system version exists * Add clean recipe to both dev and clean groups
1 parent dd3e493 commit e96ef09

37 files changed

Lines changed: 1581 additions & 737 deletions

.github/workflows/python-release.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,9 @@ jobs:
192192
CIBW_MANYLINUX_AARCH64_IMAGE: "manylinux_2_28"
193193
# Linux configuration - GCC Toolset and CUDA paths are conditional via matrix variables
194194
CIBW_ENVIRONMENT_LINUX: >
195-
PATH=${{ matrix.gcc_path_prefix }}$HOME/.cargo/bin:$HOME/.pecos/llvm/bin:/usr/local/cuda-12.6/bin:$PATH
195+
PATH=${{ matrix.gcc_path_prefix }}$HOME/.cargo/bin:$HOME/.pecos/deps/llvm/bin:/usr/local/cuda-12.6/bin:$PATH
196196
LD_LIBRARY_PATH=${{ matrix.gcc_ld_path }}$LD_LIBRARY_PATH
197-
LLVM_SYS_140_PREFIX=$HOME/.pecos/llvm
197+
LLVM_SYS_140_PREFIX=$HOME/.pecos/deps/llvm
198198
CUDA_PATH=/usr/local/cuda-12.6
199199
MATURIN_PEP517_ARGS="${{ matrix.cuda_feature }}"
200200
CIBW_BEFORE_ALL_LINUX: |
@@ -223,8 +223,8 @@ jobs:
223223
pipx run abi3audit --strict --report {wheel}
224224
# macOS configuration
225225
CIBW_ENVIRONMENT_MACOS: >
226-
PATH=$HOME/.cargo/bin:$HOME/.pecos/llvm/bin:$PATH
227-
LLVM_SYS_140_PREFIX=$HOME/.pecos/llvm
226+
PATH=$HOME/.cargo/bin:$HOME/.pecos/deps/llvm/bin:$PATH
227+
LLVM_SYS_140_PREFIX=$HOME/.pecos/deps/llvm
228228
MACOSX_DEPLOYMENT_TARGET=13.2
229229
CIBW_BEFORE_ALL_MACOS: |
230230
curl -sSf https://sh.rustup.rs | sh -s -- -y
@@ -237,22 +237,22 @@ jobs:
237237
printf '#!/bin/bash\nunset DYLD_LIBRARY_PATH\nexec /usr/bin/codesign "$@"\n' > $HOME/.pecos/bin/codesign
238238
chmod +x $HOME/.pecos/bin/codesign
239239
CIBW_REPAIR_WHEEL_COMMAND_MACOS: >
240-
PATH=$HOME/.pecos/bin:$PATH DYLD_LIBRARY_PATH=$HOME/.pecos/llvm/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} &&
240+
PATH=$HOME/.pecos/bin:$PATH DYLD_LIBRARY_PATH=$HOME/.pecos/deps/llvm/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} &&
241241
pipx run abi3audit --strict --report {wheel}
242242
# Windows configuration - CUDA via Jimver/cuda-toolkit (installed before cibuildwheel)
243243
CIBW_ENVIRONMENT_WINDOWS: >
244-
PATH="C:\\Users\\runneradmin\\.pecos\\llvm\\bin;$PATH"
245-
LLVM_SYS_140_PREFIX="C:\\Users\\runneradmin\\.pecos\\llvm"
244+
PATH="C:\\Users\\runneradmin\\.pecos\\deps\\llvm\\bin;$PATH"
245+
LLVM_SYS_140_PREFIX="C:\\Users\\runneradmin\\.pecos\\deps\\llvm"
246246
MATURIN_PEP517_ARGS="${{ matrix.cuda_feature }}"
247247
CIBW_BEFORE_ALL_WINDOWS: >
248248
echo "=== Installing LLVM using pecos ===" &&
249249
rustup update &&
250250
echo "=== Running pecos install llvm ===" &&
251251
cargo run --release -p pecos --features cli -- install llvm --force &&
252252
echo "=== Checking LLVM installation ===" &&
253-
(test -d "C:\\Users\\runneradmin\\.pecos\\llvm" && echo "LLVM directory exists" && ls -la "C:\\Users\\runneradmin\\.pecos\\llvm" && (ls -la "C:\\Users\\runneradmin\\.pecos\\llvm\\bin" || echo "bin directory not found")) || (echo "ERROR: LLVM directory not found!" && exit 1) &&
253+
(test -d "C:\\Users\\runneradmin\\.pecos\\deps\\llvm" && echo "LLVM directory exists" && ls -la "C:\\Users\\runneradmin\\.pecos\\deps\\llvm" && (ls -la "C:\\Users\\runneradmin\\.pecos\\deps\\llvm\\bin" || echo "bin directory not found")) || (echo "ERROR: LLVM directory not found!" && exit 1) &&
254254
echo "=== Verifying LLVM_SYS_140_PREFIX ===" &&
255-
echo "LLVM_SYS_140_PREFIX will be set to: C:\\Users\\runneradmin\\.pecos\\llvm"
255+
echo "LLVM_SYS_140_PREFIX will be set to: C:\\Users\\runneradmin\\.pecos\\deps\\llvm"
256256
# Install delvewheel and patch it to ignore ext-ms-win-* API sets
257257
# (delvewheel ignores api-ms-win-* but not ext-ms-win-* which are also Windows API sets)
258258
CIBW_BEFORE_BUILD_WINDOWS: >
@@ -261,7 +261,7 @@ jobs:
261261
# Note: --no-dll excludes Windows system DLLs that should not be bundled
262262
# combase.dll and rmclient.dll are core Windows components that fail when bundled
263263
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: >
264-
delvewheel repair -v --add-path "C:\\Users\\runneradmin\\.pecos\\llvm\\bin" --no-dll "combase.dll;rmclient.dll" -w {dest_dir} {wheel} &&
264+
delvewheel repair -v --add-path "C:\\Users\\runneradmin\\.pecos\\deps\\llvm\\bin" --no-dll "combase.dll;rmclient.dll" -w {dest_dir} {wheel} &&
265265
pipx run abi3audit --strict --report {wheel}
266266
267267
- name: Upload wheels

0 commit comments

Comments
 (0)