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 @@ -33,7 +33,10 @@ RUN find . -name "*.dist-info" -type d | xargs rm -rf
33
33
# https://docs.python.org/3.11/using/cmdline.html#cmdoption-O
34
34
# https://docs.python.org/3/using/cmdline.html#envvar-PYTHONNODEBUGRANGES
35
35
RUN PYTHONNODEBUGRANGES=1 python -OO -m compileall -b ./python/lib/$runtime/site-packages
36
- RUN find ./python/lib/$runtime/site-packages -name \* .py -delete
36
+ # remove all .py files except ddtrace/contrib/*/__init__.py which are necessary
37
+ # for ddtrace.patch to discover instrumationation packages.
38
+ RUN find ./python/lib/$runtime/site-packages -name \* .py | grep -v ddtrace/contrib | xargs rm -rf
39
+ RUN find ./python/lib/$runtime/site-packages/ddtrace/contrib -name \* .py | grep -v __init__ | xargs rm -rf
37
40
RUN find ./python/lib/$runtime/site-packages -name __pycache__ -type d -exec rm -r {} \+
38
41
39
42
FROM scratch
You can’t perform that action at this time.
0 commit comments