diff options
author | Vincent Driessen <vincent@3rdcloud.com> | 2012-02-04 11:03:22 +0100 |
---|---|---|
committer | Vincent Driessen <vincent@3rdcloud.com> | 2012-02-04 11:07:42 +0100 |
commit | 3a73223204576868dcd3e40481a6ad916ab128a9 (patch) | |
tree | db2996b47be0cedbde359a627be89d5be9abcca6 | |
parent | 342a4051d03adeb2d83d2729a98e50c667c11e4d (diff) | |
download | times-3a73223204576868dcd3e40481a6ad916ab128a9.tar.gz |
Revert "No need to store the version in a separate file."0.3
This reverts commit a8373a2 and fixes #3.
If we import times from the setup.py file, it'll require pytz to be
available at install time, which we should not be wanting. Therefore,
I've reverted back to the state where I simply import the version number
from the version.py file directly.
Conflicts:
times/__init__.py
-rw-r--r-- | setup.py | 9 | ||||
-rw-r--r-- | times/__init__.py | 3 | ||||
-rw-r--r-- | times/version.py | 1 |
3 files changed, 10 insertions, 3 deletions
@@ -1,8 +1,13 @@ +import os from setuptools import setup def get_version(): - from times import __version__ - return __version__ + basedir = os.path.dirname(__file__) + with open(os.path.join(basedir, 'times/version.py')) as f: + VERSION = None + exec(f.read()) + return VERSION + raise RuntimeError('No version info found.') setup( name='times', diff --git a/times/__init__.py b/times/__init__.py index 50fcc38..a01fe78 100644 --- a/times/__init__.py +++ b/times/__init__.py @@ -1,9 +1,10 @@ import datetime import calendar import pytz +from .version import VERSION __author__ = 'Vincent Driessen <vincent@3rdcloud.com>' -__version__ = '0.3' +__version__ = VERSION def to_universal(local_dt, timezone=None): diff --git a/times/version.py b/times/version.py new file mode 100644 index 0000000..014a8e4 --- /dev/null +++ b/times/version.py @@ -0,0 +1 @@ +VERSION = '0.3' |