Skip to content

Commit

Permalink
Switch from pystache to chevron for mustache template support (pystac…
Browse files Browse the repository at this point in the history
…he no longer maintained uses use_2to3 which was deprecated in the most recent release of setuptools; see pypa/setuptools#2769)
  • Loading branch information
langmm committed Sep 9, 2021
1 parent 6c9a0e7 commit 292baa3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ requirements:
- sysv_ipc # [unix]
- zeromq
run:
- chevron
- cmake # [not win]
- czmq
- flaky
Expand All @@ -65,7 +66,6 @@ requirements:
- pyperf
- pint # [py2k]
- psutil
- pystache
- python
- python-rapidjson # [not py2k]
- pyyaml
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
chevron
flask
jsonschema>=3
matplotlib
numpy>=1.13.0
pandas
pyperf
psutil
pystache
python-rapidjson
pyyaml
pyzmq
Expand Down
4 changes: 2 additions & 2 deletions yggdrasil/drivers/OSRModelDriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import subprocess
import tempfile
import logging
import pystache
import chevron
import io as sio
import warnings
import xml.etree.ElementTree as ET
Expand Down Expand Up @@ -203,7 +203,7 @@ def wrap_xml(self, src, dst):
"""
with open(src, 'r') as fd:
src_contents = fd.read()
src_contents = pystache.render(
src_contents = chevron.render(
sio.StringIO(src_contents).getvalue(), self.set_env())
root = ET.fromstring(src_contents)
timesync = self.timesync
Expand Down
4 changes: 2 additions & 2 deletions yggdrasil/yamlfile.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import copy
import pprint
import pystache
import chevron
import yaml
import json
import git
Expand Down Expand Up @@ -101,7 +101,7 @@ def load_yaml(fname):
fname = os.path.join(os.getcwd(), 'stream')
# Mustache replace vars
yamlparsed = fd.read()
yamlparsed = pystache.render(
yamlparsed = chevron.render(
sio.StringIO(yamlparsed).getvalue(), dict(os.environ))
if fname.endswith('.json'):
yamlparsed = json.loads(yamlparsed)
Expand Down

0 comments on commit 292baa3

Please sign in to comment.