Skip to content
Snippets Groups Projects
Commit c3a22edd authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

setup: Don't directly import the version file

Load the version module explicitly by defining its path. Weird
situations may occur if you have a version of the project already
installed in your system and you import project modules in setup.py
parent f13a2c72
No related branches found
No related tags found
No related merge requests found
#!/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',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment