diff --git a/setup.py b/setup.py index 4bf663a11c4d2b6c5fc3681e8b3da24c92764da9..836a7ee45d1e2ea35f9c90a81a455a6b63a82fb6 100755 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- # -# Copyright (C) 2011-2015 GRNET S.A. +# Copyright (C) 2011-2016 GRNET S.A. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,16 +16,17 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -import image_creator from os.path import dirname, abspath, join - from setuptools import setup, find_packages +from imp import load_source -README = join(dirname(abspath(__file__)), 'README.md') +CWD = dirname(abspath(__file__)) +README = join(CWD, 'README.md') +VERSION = join(CWD, 'image_creator', 'version.py') setup( name='snf_image_creator', - version=image_creator.__version__, + version=getattr(load_source('version', VERSION), "__version__"), description='Command line tool for creating images', long_description=open(README).read(), url='https://github.com/grnet/snf-image',