X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=snap%2Fsnapcraft.yaml;h=0c2aa94d8c93f6aa2cb46ea94a115fc1bd337b8a;hb=refs%2Fchanges%2F77%2F13577%2F2;hp=b7d0f05c7b282180cbb7d37f3cc748dc080ae835;hpb=b6ab5da8fa0f29fba2b71177a909ab814ba190fb;p=osm%2Fosmclient.git diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index b7d0f05..0c2aa94 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,20 +1,65 @@ -name: osmclient # you probably want to 'snapcraft register ' -version: '0.1' # just for humans, typically '1.2+git' or '1.3.2' -summary: A python client for osm orchestration +--- +## +# Copyright 2020 ETSI +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +## +name: osmclient +base: core22 +adopt-info: client +summary: A python client for orchestrating OSM description: | - A python client for osm orchestration + A python client for orchestrating Open Source Mano (OSM). -grade: stable # must be 'stable' to release into candidate/stable channels -confinement: strict # use 'strict' once you have the right plugs and slots +grade: stable + +confinement: strict + +environment: + LC_ALL: C.UTF-8 + LANG: C.UTF-8 apps: - osmclient: + osm: command: bin/osm + plugs: + - network + - home + - ssh-public-keys + environment: + PATH: $SNAP/usr/bin:$SNAP/bin/:$PATH:$SNAP/usr/local/bin/:/usr/local/bin/ + MAGIC: $SNAP/usr/share/file/magic.mgc parts: - osmclient: - source: . + client: plugin: python - python-version: python2 - stage: - - -README.md + source: . + python-requirements: + - requirements.txt + - requirements-dev.txt + python-packages: + - pyangbind + build-environment: + - PIP_COMPILE: "false" # disable .pyc generation in pip + - PYTHONDONTWRITEBYTECODE: "false" # disable .pyc generation by setup.py + build-packages: + - wget + stage-packages: + - libmagic1 + - python3 + override-build: | + VERSION=$(git describe --match v* --tags --long --dirty) + snapcraftctl set-version $VERSION + snapcraftctl build + `find $SNAPCRAFT_PART_INSTALL -name '__pycache__' | xargs rm -r` + `find $SNAPCRAFT_PART_INSTALL -name 'RECORD' | xargs rm`