added fixed setup.py for Python-3.3 py33
authorrptlab
Fri, 22 Feb 2013 15:16:19 +0000
branchpy33
changeset 3724 8c3d733474a0
parent 3723 99aa837b6703
child 3725 ca840494f9dd
added fixed setup.py for Python-3.3
setup.py
--- a/setup.py	Tue Apr 30 14:28:14 2013 +0100
+++ b/setup.py	Fri Feb 22 15:16:19 2013 +0000
@@ -2,6 +2,7 @@
 #see license.txt for license details
 __version__=''' $Id$ '''
 import os, sys, glob, configparser, shutil
+import functools
 platform = sys.platform
 pjoin = os.path.join
 abspath = os.path.abspath
@@ -50,8 +51,9 @@
     try:
         for l in open(pjoin(FN+'.py'),'r').readlines():
             if l.startswith('Version'):
-                exec(l.strip())
-                return Version
+                D = {}
+                exec(l.strip(),D)
+                return D['Version']
     except:
         pass
 
@@ -164,7 +166,7 @@
     if _:
         _ = list(filter(_rl_dir_info(cn),_))
         if len(_):
-            _.sort(_cmp_rl_ccode_dirs)
+            _.sort(key=functools.cmp_to_key(_cmp_rl_ccode_dirs))
             return abspath(_[0])
     return None