forked from iterative/dvc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
snapcraft.yaml
52 lines (52 loc) · 1.48 KB
/
snapcraft.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: dvc
summary: Data Version Control
description: Git for Data & Models https://dvc.org
adopt-info: dvc
grade: stable
confinement: classic # for `dvc run`ning external binaries
base: core18
license: Apache-2.0
layout:
/etc/dvc:
bind: $SNAP_DATA/etc/dvc
/usr/share/git-core:
bind: $SNAP/usr/share/git-core
/usr/share/gitweb:
bind: $SNAP/usr/share/gitweb
/usr/lib/git-core:
bind: $SNAP/usr/lib/git-core
parts:
dvc:
plugin: python
python-packages: [wheel]
source: .
build-snaps:
- snapd
build-packages:
- git
- libc-dev
stage-packages:
- git
override-pull: |
snapcraftctl pull
snapcraftctl set-version `cd $SNAPCRAFT_PART_SRC && git describe --tags`
git diff --quiet || error_dirty_build
echo 'PKG = "snap"' > $SNAPCRAFT_PART_SRC/dvc/utils/build.py
# install all optional extras
sed -ri 's/(=install_requires)/\1+all_remotes+hdfs/' $SNAPCRAFT_PART_SRC/setup.py
# ensure dvc knows the state isn't really dirty
sed -rin 's/.*git.*diff.*--quiet.*//' $SNAPCRAFT_PART_SRC/dvc/version.py
override-build: |
snapcraftctl build
cp $SNAPCRAFT_PART_BUILD/scripts/completion/dvc.bash $SNAPCRAFT_PART_INSTALL/completion.sh
apps:
dvc:
command: bin/dvc
completer: completion.sh
environment:
GIT_PYTHON_GIT_EXECUTABLE: $SNAP/usr/bin/git
XDG_CONFIG_DIRS: /etc
git:
command: usr/bin/git
environment:
GIT_DISCOVERY_ACROSS_FILESYSTEM: 1