From c728725706f8436a0169b90390c2cea897dacddc Mon Sep 17 00:00:00 2001 From: Rey Abolofia Date: Fri, 28 Feb 2025 15:08:52 -0500 Subject: [PATCH] Ddtrace now requires patch.py rather than __init__.py files. --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 554766df..a1b24bf3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,10 +47,10 @@ RUN rm -rf \ # https://docs.python.org/3.11/using/cmdline.html#cmdoption-O # https://docs.python.org/3/using/cmdline.html#envvar-PYTHONNODEBUGRANGES RUN PYTHONNODEBUGRANGES=1 python -OO -m compileall -b ./python/lib/$runtime/site-packages -# remove all .py files except ddtrace/contrib/*/__init__.py which are necessary +# remove all .py files except ddtrace/contrib/*/patch.py which are necessary # for ddtrace.patch to discover instrumationation packages. RUN find ./python/lib/$runtime/site-packages -name \*.py | grep -v ddtrace/contrib | xargs rm -rf -RUN find ./python/lib/$runtime/site-packages/ddtrace/contrib -name \*.py | grep -v __init__ | xargs rm -rf +RUN find ./python/lib/$runtime/site-packages/ddtrace/contrib -name \*.py | grep -v patch.py | xargs rm -rf RUN find ./python/lib/$runtime/site-packages -name __pycache__ -type d -exec rm -r {} \+ # When building ddtrace from branch, remove extra source files. These are