X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_common%2F__init__.py;h=8bc5507d7b2158a39621ac4e07878a1f65bce572;hb=HEAD;hp=4ed9a8f496179a3514f49eb6da0c2d86efb46a4a;hpb=8657799f1469d2495c06087e88aca2777d425806;p=osm%2Fcommon.git diff --git a/osm_common/__init__.py b/osm_common/__init__.py index 4ed9a8f..c4c32da 100644 --- a/osm_common/__init__.py +++ b/osm_common/__init__.py @@ -1,2 +1,29 @@ -version = '0.1.4' -date_version = '2018-05-10' +# -*- 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")