summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Artemenko <svetlyak.40wt@gmail.com>2012-10-15 19:44:13 +0000
committerAlexander Artemenko <svetlyak.40wt@gmail.com>2012-10-15 19:44:13 +0000
commit92fc2fc7dc8eaf2105e07dd01586f883f3911837 (patch)
treeb9f35a7bbadbe2c42eff0b1255df1811f463afe8
parent547dc32bba8911fb0976a117566079bcd66076d7 (diff)
downloadtimes-92fc2fc7dc8eaf2105e07dd01586f883f3911837.tar.gz
Fixes setup.py for python3.
Python3 requires explicit globals dictionary to be passed to `exec` function.
-rw-r--r--setup.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 9c82c65..2fbe96e 100644
--- a/setup.py
+++ b/setup.py
@@ -6,9 +6,9 @@ from setuptools import setup
def get_version():
basedir = os.path.dirname(__file__)
with open(os.path.join(basedir, 'times/version.py')) as f:
- VERSION = None
- exec(f.read())
- return VERSION
+ variables = {}
+ exec(f.read(), variables)
+ return variables.get('VERSION')
raise RuntimeError('No version info found.')