save list of python dep shared libs

This commit is contained in:
aptalca 2024-03-07 21:13:46 -05:00
parent f7cc6766dd
commit ed4c00abac
No known key found for this signature in database
GPG Key ID: BE36CFFB9FD85548
2 changed files with 12 additions and 2 deletions

View File

@ -70,6 +70,11 @@ RUN \
CFLAGS="-fno-semantic-interposition -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free" \
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" && \
make install && \
find /pythoncompiled -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \
| tr ',' '\n' \
| sort -u \
| awk 'system("[ -e /pythoncompiled/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
| xargs -rt echo > /pythoncompiled/python-deps.txt && \
find /pythoncompiled -depth \
\( \
-type d -a \( -name test -o -name tests \) \
@ -89,7 +94,7 @@ RUN \
pip && \
find /pythoncompiled -depth \
\( \
-type d -a \( -name test -o -name tests \) \
-type d -a \( -name test -o -name tests \) \
\) -exec rm -rf '{}' + && \
sed -i 's|pythoncompiled|usr/local|' /pythoncompiled/bin/pip /pythoncompiled/bin/pip* /pythoncompiled/bin/wheel && \
echo "**** cleanup ****" && \

View File

@ -70,6 +70,11 @@ RUN \
CFLAGS="-fno-semantic-interposition -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free" \
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" && \
make install && \
find /pythoncompiled -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \
| tr ',' '\n' \
| sort -u \
| awk 'system("[ -e /pythoncompiled/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
| xargs -rt echo > /pythoncompiled/python-deps.txt && \
find /pythoncompiled -depth \
\( \
-type d -a \( -name test -o -name tests \) \
@ -89,7 +94,7 @@ RUN \
pip && \
find /pythoncompiled -depth \
\( \
-type d -a \( -name test -o -name tests \) \
-type d -a \( -name test -o -name tests \) \
\) -exec rm -rf '{}' + && \
sed -i 's|pythoncompiled|usr/local|' /pythoncompiled/bin/pip /pythoncompiled/bin/pip* /pythoncompiled/bin/wheel && \
echo "**** cleanup ****" && \