Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,14 @@ RUN pip install --quiet packaging && \
fi
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
# removed by the ddtrace build process before publishing a wheel to PyPI.
RUN find ./python/lib/$runtime/site-packages/ddtrace -name \*.c -delete
RUN find ./python/lib/$runtime/site-packages/ddtrace -name \*.cpp -delete
RUN find ./python/lib/$runtime/site-packages/ddtrace -name \*.cc -delete
RUN find ./python/lib/$runtime/site-packages/ddtrace -name \*.h -delete
RUN find ./python/lib/$runtime/site-packages/ddtrace -name \*.hpp -delete
RUN find ./python/lib/$runtime/site-packages/ddtrace -name \*.pyx -delete
RUN find ./python/lib/$runtime/site-packages/ddtrace -name \*.pyi -delete
# Remove C/C++/Cython sources and type stubs. Nothing imports them at runtime.
# ddtrace ships them when built from a branch, and other packages ship them
# in their release wheels (e.g. wrapt/_wrappers.c is ~150 kB, wrapt-stubs ~30 kB).
RUN find ./python/lib/$runtime/site-packages -type f \( \
-name \*.c -o -name \*.cpp -o -name \*.cc -o -name \*.h -o -name \*.hpp \
-o -name \*.pyx -o -name \*.pxd -o -name \*.pyi \
\) -delete
RUN find ./python/lib/$runtime/site-packages -type d -empty -delete

# Strip debug symbols and symbols that are not needed for relocation
# processing using strip --strip-unneeded for all .so files. This is to
Expand Down
Loading