Show More
@@ -45,6 +45,9 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 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): | |
@@ -351,8 +359,8 def record_commit_info(pkg_dir, build_cmd=build_py): | |||||
351 | # We write the installation commit even if it's empty |
|
359 | # We write the installation commit even if it's empty | |
352 | out_pth = pjoin(self.build_lib, pkg_dir, 'utils', '_sysinfo.py') |
|
360 | out_pth = pjoin(self.build_lib, pkg_dir, 'utils', '_sysinfo.py') | |
353 | with io.open(out_pth, 'w') as out_file: |
|
361 | with io.open(out_pth, 'w') as out_file: | |
354 | out_file.writelines([ |
|
362 | out_file.writelines(map(unicode, [ | |
355 |
|
|
363 | '# GENERATED BY setup.py\n', | |
356 |
|
|
364 | 'commit = "%s"\n' % repo_commit, | |
357 | ]) |
|
365 | ])) | |
358 | return MyBuildPy |
|
366 | return MyBuildPy |
General Comments 0
You need to be logged in to leave comments.
Login now