Skip to content

Commit

Permalink
build_library: Shrink the sysext-python image by removing python tests
Browse files Browse the repository at this point in the history
Do the same thing we did for GCE and Azure.
  • Loading branch information
krnowak committed Aug 14, 2024
1 parent 131b569 commit 83c4cdc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions build_library/sysext_mangle_flatcar-python
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,14 @@ pushd "${rootfs}"

rm -rf ./usr/{lib/debug,share,include,lib64/pkgconfig}

# Remove test stuff from python - it's quite large.
for p in ./usr/lib/python*; do
if [[ ! -d ${p} ]]; then
continue
fi
# find directories named tests or test and remove them (-prune
# avoids searching below those directories)
find "${p}" \( -name tests -o -name test \) -type d -prune -exec rm -rf '{}' '+'
done

popd

0 comments on commit 83c4cdc

Please sign in to comment.