Skip to content

Commit

Permalink
Remove __pycache__ and test module .so files
Browse files Browse the repository at this point in the history
The `__pycache__` directories were still be included in the final image.
It also missed removing the C-extension tests `*.so` files.
  • Loading branch information
RobertDeRose committed Oct 16, 2024
1 parent 2965c79 commit a5a10a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile-linux.template
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ RUN set -eux; \
\
find /usr/local -depth \
\( \
\( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \
-o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \
\( -type d -a \( -name test -o -name tests -o -name idle_test -o -name __pycache__ \) \) -o \
\( -type f -a \( -name '*.py[co]' -o -name 'libpython*.a' -o -name *test*.so \) \) \
\) -exec rm -rf '{}' + \
; \
\
Expand Down

0 comments on commit a5a10a9

Please sign in to comment.