Skip to content

Commit

Permalink
Move version to a separate file. Fix oleiade#50
Browse files Browse the repository at this point in the history
In order to get the current version, the setup was importing
py-elevator. This was causing an issue as the depencencies were
not installed yet.
Now the version is in its own file, and is imported in __init__.py
and setup.py.
  • Loading branch information
k4nar committed May 14, 2014
1 parent 8ade3f3 commit 8b35f23
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 1 addition & 3 deletions pyelevator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@
#
# See the file LICENSE for copying permission.

version = (0, "5c")
from version import version, __version__

__title__ = "py-elevator"
__author__ = "Oleiade"
__license__ = "MIT"

__version__ = '.'.join(map(str, version))

from .client import Elevator
from .batch import WriteBatch
2 changes: 2 additions & 0 deletions pyelevator/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
version = (0, "5c")
__version__ = '.'.join(map(str, version))
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
# -*- coding: utf-8 -*-

import os
import imp
from setuptools import setup

root = os.path.abspath(os.path.dirname(__file__))

version = __import__('pyelevator').__version__
version = imp.load_source('', 'pyelevator/version.py').__version__

with open(os.path.join(root, 'README.rst')) as f:
README = f.read()
Expand All @@ -16,7 +17,7 @@
version=version,
license='MIT',

description = 'Python client for on-disk key/value database Elevator',
description='Python client for on-disk key/value database Elevator',
long_description=README,

author='Oleiade',
Expand Down

0 comments on commit 8b35f23

Please sign in to comment.