##// END OF EJS Templates
Emergency fix for py3 breakage introduced in 576f6f (merge of #1538)...
Fernando Perez -
Show More
@@ -1,2 +1,2 b''
1 # GENERATED BY setup.py
1 # GENERATED BY setup.py
2 commit = ''
2 commit = ""
@@ -45,6 +45,9 b' def oscmd(s):'
45 print(">", s)
45 print(">", s)
46 os.system(s)
46 os.system(s)
47
47
48 # Py3 compatibility hacks, without assuming IPython itself is installed with
49 # the full py3compat machinery.
50
48 try:
51 try:
49 execfile
52 execfile
50 except NameError:
53 except NameError:
@@ -52,6 +55,11 b' except NameError:'
52 locs = locs or globs
55 locs = locs or globs
53 exec(compile(open(fname).read(), fname, "exec"), globs, locs)
56 exec(compile(open(fname).read(), fname, "exec"), globs, locs)
54
57
58 try:
59 unicode
60 except NameError:
61 unicode = str
62
55 # A little utility we'll need below, since glob() does NOT allow you to do
63 # A little utility we'll need below, since glob() does NOT allow you to do
56 # exclusion on multiple endings!
64 # exclusion on multiple endings!
57 def file_doesnt_endwith(test,endings):
65 def file_doesnt_endwith(test,endings):
@@ -389,8 +397,8 b' def record_commit_info(pkg_dir, build_cmd=build_py):'
389 # We write the installation commit even if it's empty
397 # We write the installation commit even if it's empty
390 out_pth = pjoin(self.build_lib, pkg_dir, 'utils', '_sysinfo.py')
398 out_pth = pjoin(self.build_lib, pkg_dir, 'utils', '_sysinfo.py')
391 with io.open(out_pth, 'w') as out_file:
399 with io.open(out_pth, 'w') as out_file:
392 out_file.writelines([
400 out_file.writelines(map(unicode, [
393 u"# GENERATED BY setup.py\n",
401 '# GENERATED BY setup.py\n',
394 u"commit = '%s'\n" % repo_commit,
402 'commit = "%s"\n' % repo_commit,
395 ])
403 ]))
396 return MyBuildPy
404 return MyBuildPy
General Comments 0
You need to be logged in to leave comments. Login now