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:
parent
4e1b099547
commit
30e973402b
@ -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.
|
||||
|
4
dev/install_dependencies_alpine.sh
Normal file
4
dev/install_dependencies_alpine.sh
Normal 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
|
4
dev/templates/dev/install_dependencies_alpine.sh.jinja
Normal file
4
dev/templates/dev/install_dependencies_alpine.sh.jinja
Normal 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
26
dev/update_dist_files.py
Normal 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')
|
@ -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')
|
Loading…
Reference in New Issue
Block a user