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:
Andrew 2023-07-19 22:01:39 +03:00 committed by GitHub
parent 994cadf1e2
commit c9ad22828c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 0 deletions

View 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

View file

@ -0,0 +1,5 @@
<html>
<body>
<h1>Hello! My name is ${name}</h1>
</body>
</html>

View 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)