We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80f3c9a commit 8373740Copy full SHA for 8373740
scripts/templater.py
@@ -1,7 +1,11 @@
1
+import os
2
import tomllib
3
import argparse
4
from typing import Any
5
6
+script_dir = os.path.dirname(os.path.abspath(__file__))
7
+repo_dir = os.path.dirname(script_dir)
8
+template_path = os.path.join(repo_dir, 'recipes', 'recipe.tmpl')
9
10
def build_dependency_list(dependencies: dict[str, str]) -> list[str]:
11
deps: list[str] = []
@@ -37,7 +41,7 @@ def main():
37
41
config = tomllib.load(f)
38
42
39
43
recipe: str
40
- with open('recipes/template.tmpl', 'r') as f:
44
+ with open(template_path, 'r') as f:
45
recipe = f.read()
46
47
# Replace the placeholders in the recipe with the project configuration.
0 commit comments