mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 02:25:18 +03:00
makotemplates.org (#2625)
* new file: projects/makotemplates.org/package.yml new file: projects/makotemplates.org/test.mako new file: projects/makotemplates.org/test.py * PYTHONPATH * PYTHONPATH * PYTHONPATH
This commit is contained in:
parent
994cadf1e2
commit
c9ad22828c
20
projects/makotemplates.org/package.yml
Normal file
20
projects/makotemplates.org/package.yml
Normal file
|
@ -0,0 +1,20 @@
|
|||
distributable:
|
||||
url: https://github.com/sqlalchemy/mako/archive/rel_{{version.major}}_{{version.minor}}_{{version.patch}}.tar.gz
|
||||
strip-components: 1
|
||||
versions:
|
||||
github: sqlalchemy/mako/releases
|
||||
strip:
|
||||
- /rel_/
|
||||
dependencies:
|
||||
python.org: ^3.11
|
||||
runtime:
|
||||
env:
|
||||
PYTHONPATH: "{{prefix}}/venv/lib/python3.11/site-packages:$PYTHONPATH"
|
||||
build:
|
||||
script:
|
||||
- python-venv.sh {{prefix}}/bin/mako-render
|
||||
provides:
|
||||
- bin/mako-render
|
||||
test:
|
||||
script:
|
||||
- python test.py
|
5
projects/makotemplates.org/test.mako
Normal file
5
projects/makotemplates.org/test.mako
Normal file
|
@ -0,0 +1,5 @@
|
|||
<html>
|
||||
<body>
|
||||
<h1>Hello! My name is ${name}</h1>
|
||||
</body>
|
||||
</html>
|
7
projects/makotemplates.org/test.py
Normal file
7
projects/makotemplates.org/test.py
Normal file
|
@ -0,0 +1,7 @@
|
|||
from mako.template import Template
|
||||
|
||||
template = Template(filename='test.mako')
|
||||
|
||||
rendered_template = template.render(name='tea.xyz')
|
||||
|
||||
print(rendered_template)
|
Loading…
Reference in a new issue