| --- |
| ## |
| # 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: core20 |
| adopt-info: client |
| summary: A python client for orchestrating OSM |
| description: | |
| A python client for orchestrating Open Source Mano (OSM). |
| |
| grade: stable |
| |
| confinement: strict |
| |
| environment: |
| LC_ALL: C.UTF-8 |
| LANG: C.UTF-8 |
| |
| apps: |
| 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: |
| client: |
| plugin: python |
| source: . |
| requirements: |
| - requirements-dev.txt |
| - requirements.txt |
| python-packages: |
| - pip==21.0.1 |
| - setuptools==44.0.0 |
| build-environment: |
| - PIP_COMPILE: "false" # disable .pyc generation in pip |
| - PYTHONDONTWRITEBYTECODE: "false" # disable .pyc generation by setup.py |
| build-packages: |
| - gcc |
| - git |
| - make |
| - wget |
| - libcurl4-openssl-dev |
| - libssl-dev |
| - python3-distutils |
| - python3-dev |
| - python3-pip |
| - python3-pycurl |
| stage-packages: |
| - libmagic1 |
| - libcurl4-openssl-dev |
| - 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` |