Skip to content

Commit ed4c00a

Browse files
committed
save list of python dep shared libs
1 parent f7cc676 commit ed4c00a

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ RUN \
7070
CFLAGS="-fno-semantic-interposition -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free" \
7171
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" && \
7272
make install && \
73+
find /pythoncompiled -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \
74+
| tr ',' '\n' \
75+
| sort -u \
76+
| awk 'system("[ -e /pythoncompiled/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
77+
| xargs -rt echo > /pythoncompiled/python-deps.txt && \
7378
find /pythoncompiled -depth \
7479
\( \
7580
-type d -a \( -name test -o -name tests \) \
@@ -89,7 +94,7 @@ RUN \
8994
pip && \
9095
find /pythoncompiled -depth \
9196
\( \
92-
-type d -a \( -name test -o -name tests \) \
97+
-type d -a \( -name test -o -name tests \) \
9398
\) -exec rm -rf '{}' + && \
9499
sed -i 's|pythoncompiled|usr/local|' /pythoncompiled/bin/pip /pythoncompiled/bin/pip* /pythoncompiled/bin/wheel && \
95100
echo "**** cleanup ****" && \

Dockerfile.aarch64

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ RUN \
7070
CFLAGS="-fno-semantic-interposition -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free" \
7171
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" && \
7272
make install && \
73+
find /pythoncompiled -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \
74+
| tr ',' '\n' \
75+
| sort -u \
76+
| awk 'system("[ -e /pythoncompiled/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
77+
| xargs -rt echo > /pythoncompiled/python-deps.txt && \
7378
find /pythoncompiled -depth \
7479
\( \
7580
-type d -a \( -name test -o -name tests \) \
@@ -89,7 +94,7 @@ RUN \
8994
pip && \
9095
find /pythoncompiled -depth \
9196
\( \
92-
-type d -a \( -name test -o -name tests \) \
97+
-type d -a \( -name test -o -name tests \) \
9398
\) -exec rm -rf '{}' + && \
9499
sed -i 's|pythoncompiled|usr/local|' /pythoncompiled/bin/pip /pythoncompiled/bin/pip* /pythoncompiled/bin/wheel && \
95100
echo "**** cleanup ****" && \

0 commit comments

Comments
 (0)