File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 33from importlib import resources as importlib_resources
44
55from jinja2 import Template
6+ from packaging .version import Version
67
78from mache .machine_info import MachineInfo , discover_machine
89from mache .spack .script import get_spack_script
@@ -139,9 +140,13 @@ def make_spack_env(
139140
140141 modules = f'{ modules } \n export TMPDIR={ tmpdir } '
141142
143+ # Use PEP 440 parsing to strip any pre/dev/post release tags and keep only
144+ # the base release version (e.g., "1.2.3rc1" -> "1.2.3").
145+ version = Version (__version__ ).base_version
146+
142147 template_args = dict (
143148 modules = modules ,
144- version = __version__ ,
149+ version = version ,
145150 spack_path = spack_path ,
146151 env_name = env_name ,
147152 yaml_filename = yaml_filename ,
You can’t perform that action at this time.
0 commit comments