Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ requirements:
- importlib_resources
- jinja2
- lxml
- packaging
- pyyaml
- requests
- rsync
Expand Down
7 changes: 6 additions & 1 deletion mache/spack/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from importlib import resources as importlib_resources

from jinja2 import Template
from packaging.version import Version

from mache.machine_info import MachineInfo, discover_machine
from mache.spack.script import get_spack_script
Expand Down Expand Up @@ -139,9 +140,13 @@ def make_spack_env(

modules = f'{modules}\nexport TMPDIR={tmpdir}'

# Use PEP 440 parsing to strip any pre/dev/post release tags and keep only
# the base release version (e.g., "1.2.3rc1" -> "1.2.3").
version = Version(__version__).base_version

template_args = dict(
modules=modules,
version=__version__,
version=version,
spack_path=spack_path,
env_name=env_name,
yaml_filename=yaml_filename,
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ dependencies = [
"importlib_resources",
"jinja2",
"lxml",
"packaging",
"pyyaml",
"requests",
"termcolor",
Expand Down
1 change: 1 addition & 0 deletions spec-file.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ python >=3.9
importlib_resources
jinja2
lxml
packaging
pyyaml
requests
rsync
Expand Down
Loading