1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Adjusted development instructions to new system

This commit is contained in:
krateng 2022-03-09 22:10:07 +01:00
parent 4e1b099547
commit 30e973402b
5 changed files with 35 additions and 25 deletions

View File

@ -14,7 +14,7 @@ To avoid cluttering your system, consider using a [virtual environment](https://
Your system needs several packages installed. On Alpine, this can be done with
```console
sh ./install/install_dependencies.sh
sh ./dev/install_dependencies_alpine.sh
```
For other distros, try to find the equivalents of the packages listed or simply check your error output.

View File

@ -0,0 +1,4 @@
apk add \
gcc python3-dev libxml2-dev libxslt-dev libffi-dev libc-dev py3-pip linux-headers \
python3 tzdata \
vips

View File

@ -0,0 +1,4 @@
apk add \
{{ tool.osreqs.alpine.build | join(' ') }} \
{{ tool.osreqs.alpine.run | join(' ') }} \
{{ tool.osreqs.alpine.opt | join(' ') }}

26
dev/update_dist_files.py Normal file
View File

@ -0,0 +1,26 @@
import toml
import os
import jinja2
with open("pyproject.toml") as filed:
data = toml.load(filed)
templatedir = "./dev/templates"
for root,dirs,files in os.walk(templatedir):
relpath = os.path.relpath(root,start=templatedir)
for f in files:
srcfile = os.path.join(root,f)
trgfile = os.path.join(relpath,f.replace(".jinja",""))
with open(srcfile) as templatefiled:
template = jinja2.Template(templatefiled.read())
result = template.render(**data)
with open(trgfile,"w") as filed:
filed.write(result)
filed.write('\n')

View File

@ -1,24 +0,0 @@
import toml
import os
import jinja2
from pprint import pprint
with open("pyproject.toml") as filed:
data = toml.load(filed)
templatedir = "./dev/templates"
for templatefile in os.listdir(templatedir):
srcfile = os.path.join(templatedir,templatefile)
trgfile = os.path.join(".",templatefile.replace(".jinja",""))
with open(srcfile) as templatefiled:
template = jinja2.Template(templatefiled.read())
result = template.render(**data)
with open(trgfile,"w") as filed:
filed.write(result)
filed.write('\n')