treewide: improve template expansion
also: support *.toml as extra configuration dictionaries
This commit is contained in:
@@ -20,7 +20,7 @@ RUN python3 -m compileall -q -j 2 /usr/local/lib/j2cfg/
|
||||
RUN libpython="${PYTHON_SITE_PACKAGES%/*}" ; \
|
||||
find "${libpython}/" -mindepth 1 -maxdepth 1 -printf '%P\0' \
|
||||
| sed -zEn \
|
||||
-e '/^(collections|concurrent|encodings|importlib|json|logging|multiprocessing|re|urllib)$/p' \
|
||||
-e '/^(collections|concurrent|encodings|importlib|json|logging|multiprocessing|re|tomllib|urllib)$/p' \
|
||||
| sort -zV \
|
||||
| env -C "${libpython}" xargs -0r \
|
||||
python3 -m compileall -q -j 2 ; \
|
||||
@@ -33,9 +33,7 @@ RUN libpython="${PYTHON_SITE_PACKAGES%/*}" ; \
|
||||
python3 -m compileall -q -j 2
|
||||
|
||||
## Python cache warmup
|
||||
RUN j2cfg-single /usr/local/lib/j2cfg/j2cfg/test.j2 /tmp/test ; \
|
||||
cat /tmp/test ; echo ; echo ; \
|
||||
rm -f /tmp/test
|
||||
RUN env -C /usr/local/lib/j2cfg/j2cfg j2cfg-single test.j2 -
|
||||
|
||||
WORKDIR /pycache
|
||||
RUN find /usr/local/ -type f -name '*.py[co]' -printf '%P\0' \
|
||||
|
Reference in New Issue
Block a user