Skip to content

Commit

Permalink
snap: restrict site-package checks (iterative#3878)
Browse files Browse the repository at this point in the history
* snap: restrict site-package checks

Fixes iterative#3514

* add comment
  • Loading branch information
casperdcl authored Jun 7, 2020
1 parent 2c9cb87 commit c70adeb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ parts:
sed -rin 's/.*git.*diff.*--quiet.*//' $SNAPCRAFT_PART_SRC/dvc/version.py
override-build: |
snapcraftctl build
# prevent user site packages interfering with this snap - reference:
# 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
apps:
dvc:
Expand Down

0 comments on commit c70adeb

Please sign in to comment.