<commit_before>{% set directory = salt['spack.defaults']('directory') %}
{% set config_dir = salt['spack.defaults']('config_dir') %}
spack:
  github.latest:
    - order: 0
    - target: {{directory}}
    - name: llnl/spack.git
    - rev: develop
    - force_fetch: True

{% set spack = salt['pillar.get']('spack', {}) %}
{% if spack.get('add_to_zprofile', False) %}
spack zprofile:
  file.append:
    - name: {{grains['userhome']}}/.salted/zprofile
    - text: |
       export SPACK_ROOT={{directory}}
       source $SPACK_ROOT/share/spack/setup-env.sh
{% endif %}

{% if 'compilers_file' in spack %}
spack compilers:
  file.managed:
    - name: {{config_dir}}/compilers.yaml
    - template: jinja
    - defaults:
        mac_version: {{grains['mac_version']}}
        gccs: {{grains['gccs']}}
    - source: {{spack['compilers_file']}}
    - makedirs: True
{% endif %}

{% if 'external_packages' in spack %}
spack external packages:
  file.managed:
    - name: {{config_dir}}/packages.yaml
    - template: jinja
    - defaults:
        pythons: {{grains['pythons']}}
        cmakes: {{grains['cmakes']}}
        gits: {{grains['gits']}}
        pcres: {{grains['pcres']}}<commit_msg>Update spack to avoid Max specific stuff<commit_after>{% set directory = salt['spack.defaults']('directory') %}
{% set config_dir = salt['spack.defaults']('config_dir') %}
spack:
  github.latest:
    - order: 0
    - target: {{directory}}
    - name: llnl/spack.git
    - rev: develop
    - force_fetch: True

{% set spack = salt['pillar.get']('spack', {}) %}
{% if spack.get('add_to_zprofile', False) %}
spack zprofile:
  file.append:
    - name: {{grains['userhome']}}/.salted/zprofile
    - text: |
       export SPACK_ROOT={{directory}}
       source $SPACK_ROOT/share/spack/setup-env.sh
{% endif %}

{% if 'compilers_file' in spack %}
spack compilers:
  file.managed:
    - name: {{config_dir}}/compilers.yaml
    - template: jinja
    - defaults:
        mac_version: {{grains.get('mac_version', None)}}
        gccs: {{grains.get('gccs', {})}}
    - source: {{spack['compilers_file']}}
    - makedirs: True
{% endif %}

{% if 'external_packages' in spack %}
spack external packages:
  file.managed:
    - name: {{config_dir}}/packages.yaml
    - template: jinja
    - defaults:
        pythons: {{grains.get('pythons', {})}}
        cmakes: {{grains.get('cmakes', {})}}
        gits: {{grains.get('gits', {})}}
        pcres: {{grains.get('pcres', {})}}
{'fraction_non_alphanumeric': 0.19156774457634057, 'fraction_numerical': 0.0008186655751125665, 'mean_word_length': 3.192109777015437, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6366705', 'n_tokens_mistral': 906, 'n_tokens_neox': 866, 'n_words': 162}