Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Revert "No need to store the version in a separate file."

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...
commit 3a73223204576868dcd3e40481a6ad916ab128a9 1 parent 342a405
@nvie authored
Showing with 10 additions and 3 deletions.
  1. +7 −2 setup.py
  2. +2 −1  times/__init__.py
  3. +1 −0  times/version.py
View
9 setup.py
@@ -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',
View
3  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):
View
1  times/version.py
@@ -0,0 +1 @@
+VERSION = '0.3'
Please sign in to comment.
Something went wrong with that request. Please try again.