Skip to content

Commit e40f4a8

Browse files
authored
Remove *.dist-info directories except entry_points.txt files. (#549)
1 parent b6edd91 commit e40f4a8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ RUN rm ./python/lib/$runtime/site-packages/ddtrace/appsec/_iast/_stacktrace*.so
2828
RUN rm ./python/lib/$runtime/site-packages/ddtrace/internal/datadog/profiling/libdd_wrapper*.so
2929
RUN rm ./python/lib/$runtime/site-packages/ddtrace/internal/datadog/profiling/ddup/_ddup.*.so
3030
RUN rm ./python/lib/$runtime/site-packages/ddtrace/internal/datadog/profiling/stack_v2/_stack_v2.*.so
31-
RUN find . -name "*.dist-info" -type d | xargs rm -rf
31+
# remove *.dist-info directories except any entry_points.txt files
32+
RUN find ./python/lib/$runtime/site-packages/*.dist-info -not -name "entry_points.txt" -type f -delete
33+
RUN find ./python/lib/$runtime/site-packages -type d -empty -delete
3234

3335
# Precompile all .pyc files and remove .py files. This speeds up load time.
3436
# Compile with optimization level 2 (-OO) and PYTHONNODEBUGRANGES=1 to redtce

0 commit comments

Comments
 (0)