Navigation Menu

Skip to content
This repository has been archived by the owner on Aug 25, 2020. It is now read-only.

Commit

Permalink
Revert "No need to store the version in a separate file."
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nvie committed Feb 4, 2012
1 parent 342a405 commit 3a73223
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
9 changes: 7 additions & 2 deletions setup.py
@@ -1,8 +1,13 @@
import os
from setuptools import setup from setuptools import setup


def get_version(): def get_version():
from times import __version__ basedir = os.path.dirname(__file__)
return __version__ 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( setup(
name='times', name='times',
Expand Down
3 changes: 2 additions & 1 deletion times/__init__.py
@@ -1,9 +1,10 @@
import datetime import datetime
import calendar import calendar
import pytz import pytz
from .version import VERSION


__author__ = 'Vincent Driessen <vincent@3rdcloud.com>' __author__ = 'Vincent Driessen <vincent@3rdcloud.com>'
__version__ = '0.3' __version__ = VERSION




def to_universal(local_dt, timezone=None): def to_universal(local_dt, timezone=None):
Expand Down
1 change: 1 addition & 0 deletions times/version.py
@@ -0,0 +1 @@
VERSION = '0.3'

0 comments on commit 3a73223

Please sign in to comment.