From 92fc2fc7dc8eaf2105e07dd01586f883f3911837 Mon Sep 17 00:00:00 2001 From: Alexander Artemenko Date: Mon, 15 Oct 2012 19:44:13 +0000 Subject: Fixes setup.py for python3. Python3 requires explicit globals dictionary to be passed to `exec` function. --- setup.py | 6 +++--- 1 file 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.') -- cgit v1.2.1