Skip to content

Commit

Permalink
snap: minimise size
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Jun 9, 2020
1 parent 69f3307 commit 77b41a9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ parts:
# https://github.com/snapcore/snapcraft/blob/19393ef36cd773a28131cec10cc0bfb3bf9c7e77/tools/snapcraft-override-build.sh#L18
sed -ri 's/^(ENABLE_USER_SITE = )None$/\1False/' $SNAPCRAFT_PART_INSTALL/usr/lib/python*/site.py
cp $SNAPCRAFT_PART_BUILD/scripts/completion/dvc.bash $SNAPCRAFT_PART_INSTALL/completion.sh
# remove files already available at runtime from the base snap - reference:
# https://forum.snapcraft.io/t/reducing-the-size-of-desktop-snaps/17280
cleanup:
after:
- dvc
plugin: nil
build-snaps:
- core18
override-prime: |
set -eux
cd "/snap/core18/current" && find . -type f,l -exec rm -f "$SNAPCRAFT_PRIME/{}" \;
apps:
dvc:
command: bin/dvc
Expand Down

0 comments on commit 77b41a9

Please sign in to comment.