summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-08-21 09:08:57 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-08-21 13:33:20 -0400
commitd6bf20100848dc61b971844e21d24da44b9f65f7 (patch)
treecdbdd5d4181c3519e2a4ddabd815cdfb8cbca631 /setup.py
parent6b70e18c5f4c4405299e54db7fa80e93dab81f0b (diff)
downloadbcfg2-d6bf20100848dc61b971844e21d24da44b9f65f7.tar.gz
bcfg2-d6bf20100848dc61b971844e21d24da44b9f65f7.tar.bz2
bcfg2-d6bf20100848dc61b971844e21d24da44b9f65f7.zip
fixed setup.py execfile() call for py3k
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 0d9bb5cd9..928556598 100755
--- a/setup.py
+++ b/setup.py
@@ -8,7 +8,13 @@ import os
import os.path
import sys
-execfile('src/lib/Bcfg2/version.py')
+vfile = 'src/lib/Bcfg2/version.py'
+try:
+ # python 2
+ execfile(vfile)
+except NameError:
+ # py3k
+ exec(compile(open(vfile).read(), vfile, 'exec'))
# we only need m2crypto on < python2.6
need_m2crypto = False