mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
gha: packages: don't build snap (#5774)
* Delete snap directory * gha: packages: remove snap
This commit is contained in:
@@ -142,19 +142,7 @@ jobs:
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.PYPI_TOKEN }}
|
||||
snap:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/[email protected]
|
||||
- name: Build the package
|
||||
uses: snapcore/action-build@v1
|
||||
id: snapcraft
|
||||
# - name: Test the package
|
||||
# run: |
|
||||
# sudo snap install --dangerous --classic ${{ steps.snapcraft.outputs.snap }}
|
||||
# dvc version
|
||||
# sudo snap remove dvc
|
||||
- name: Publish to the edge channel
|
||||
|
||||
uses: snapcore/action-publish@v1
|
||||
if: github.event_name == 'push'
|
||||
with:
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
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
|
||||
git diff --quiet || error_dirty_build
|
||||
echo 'PKG = "snap"' > dvc/utils/build.py
|
||||
# install all optional extras
|
||||
sed -ri 's/(=install_requires)/\1+all_remotes+hdfs/' setup.py
|
||||
# ensure dvc knows the state isn't really dirty
|
||||
sed -rin 's/.*git.*diff.*--quiet.*//' 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
|
||||
# make plugin aware that a file (generated later) needs to be staged
|
||||
touch $SNAPCRAFT_PART_INSTALL/completion.sh
|
||||
override-stage: |
|
||||
snapcraftctl stage
|
||||
snapcraftctl set-version $(usr/bin/python3 -m dvc --version)
|
||||
usr/bin/python3 -m dvc completion -s bash > 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
|
||||
Reference in New Issue
Block a user