Commit 2d7dfe9
committed
toolshed: take python_major_minor as an argument and align variable naming
Make the Python version a required argument to both helpers instead of
deriving it from the CUDA major. The previous case/switch over the
CUDA major was a brittle source of truth: every time a new Python or
CUDA line was supported, the helper would silently install the wrong
Python until it was updated. Pushing the choice to the caller keeps
the helpers focused on the conda environment they manage and lets the
caller pick whatever Python they actually want to test against.
New usage on both platforms is parallel:
conda_create_for_pathfinder_testing.sh 3.12 12.9.2
conda_create_for_pathfinder_testing.ps1 3.12 12.9.2
Variable / parameter names now match the usage line and read
identically across the two scripts:
- bash: ``python_major_minor`` / ``cuda_major_minor_patch``
- PowerShell: ``$PythonMajorMinor`` / ``$CudaMajorMinorPatch``
The PowerShell ``param()`` block uses ``Mandatory + Position 0/1`` so
the script accepts both positional invocation (matching the bash style
above) and the named ``-PythonMajorMinor`` / ``-CudaMajorMinorPatch``
form.
Switch the ``libcudla-dev`` gate from ``cuda_major == "13"`` to
``(( cuda_major >= 13 ))`` so future CUDA majors fall through to the
correct branch automatically. ``(( ))`` is the idiomatic bash form for
integer comparison; the script is already firmly bash-only
(``#!/bin/bash``, ``set -euo pipefail``), so the syntax is in keeping
with the rest of the file.1 parent 76d2524 commit 2d7dfe9
2 files changed
Lines changed: 14 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | 14 | | |
22 | 15 | | |
23 | | - | |
24 | | - | |
| 16 | + | |
| 17 | + | |
25 | 18 | | |
26 | 19 | | |
27 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
15 | 16 | | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | 17 | | |
30 | 18 | | |
31 | 19 | | |
32 | | - | |
| 20 | + | |
33 | 21 | | |
34 | | - | |
| 22 | + | |
35 | 23 | | |
36 | 24 | | |
37 | 25 | | |
| |||
52 | 40 | | |
53 | 41 | | |
54 | 42 | | |
55 | | - | |
| 43 | + | |
56 | 44 | | |
57 | 45 | | |
58 | 46 | | |
| |||
0 commit comments