X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_common%2F__init__.py;h=8bc5507d7b2158a39621ac4e07878a1f65bce572;hb=HEAD;hp=601b14049c05236d1a1dd1b5d4dbc67ab77db509;hpb=73da4fadae4efc8b32375723f37e482293d847ac;p=osm%2Fcommon.git diff --git a/osm_common/__init__.py b/osm_common/__init__.py index 601b140..c4c32da 100644 --- a/osm_common/__init__.py +++ b/osm_common/__init__.py @@ -1,2 +1,29 @@ -version = '0.1.6' -date_version = '2018-08-31' +# -*- coding: utf-8 -*- + +# Copyright 2018 Telefonica S.A. +# +# 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. +import logging + +version = "7.0.0.post4" +date_version = "2019-01-21" + +# try to get version from installed package. Skip if fails +try: + from pkg_resources import get_distribution + + version = get_distribution("osm_common").version + +except Exception as init_error: + logging.exception(f"{init_error} occured while getting the common version")