File tree 1 file changed +4
-1
lines changed 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,10 @@ RUN rm ./python/lib/$runtime/site-packages/ddtrace/internal/datadog/profiling/st
31
31
# https://docs.python.org/3.11/using/cmdline.html#cmdoption-O
32
32
# https://docs.python.org/3/using/cmdline.html#envvar-PYTHONNODEBUGRANGES
33
33
RUN PYTHONNODEBUGRANGES=1 python -OO -m compileall -b ./python/lib/$runtime/site-packages
34
- RUN find ./python/lib/$runtime/site-packages -name \* .py -delete
34
+ # remove all .py files except ddtrace/contrib/*/__init__.py which are necessary
35
+ # for ddtrace.patch to discover instrumationation packages.
36
+ RUN find ./python/lib/$runtime/site-packages -name \* .py | grep -v ddtrace/contrib | xargs rm -rf
37
+ RUN find ./python/lib/$runtime/site-packages/ddtrace/contrib -name \* .py | grep -v __init__ | xargs rm -rf
35
38
RUN find ./python/lib/$runtime/site-packages -name __pycache__ -type d -exec rm -r {} \+
36
39
37
40
FROM scratch
You can’t perform that action at this time.
0 commit comments