|
20 | 20 | #-------------------------------------------------------------------------------
|
21 | 21 | # Imports
|
22 | 22 | #-------------------------------------------------------------------------------
|
23 |
| -import io |
24 | 23 | import os
|
25 | 24 | import sys
|
26 | 25 |
|
@@ -55,11 +54,6 @@ def execfile(fname, globs, locs=None):
|
55 | 54 | locs = locs or globs
|
56 | 55 | exec(compile(open(fname).read(), fname, "exec"), globs, locs)
|
57 | 56 |
|
58 |
| -try: |
59 |
| - unicode |
60 |
| -except NameError: |
61 |
| - unicode = str |
62 |
| - |
63 | 57 | # A little utility we'll need below, since glob() does NOT allow you to do
|
64 | 58 | # exclusion on multiple endings!
|
65 | 59 | def file_doesnt_endwith(test,endings):
|
@@ -358,9 +352,9 @@ def run(self):
|
358 | 352 | repo_commit = repo_commit.strip()
|
359 | 353 | # We write the installation commit even if it's empty
|
360 | 354 | out_pth = pjoin(self.build_lib, pkg_dir, 'utils', '_sysinfo.py')
|
361 |
| - with io.open(out_pth, 'w') as out_file: |
362 |
| - out_file.writelines(map(unicode, [ |
| 355 | + with open(out_pth, 'w') as out_file: |
| 356 | + out_file.writelines([ |
363 | 357 | '# GENERATED BY setup.py\n',
|
364 |
| - 'commit = "%s"\n' % repo_commit, |
365 |
| - ])) |
| 358 | + 'commit = "%s"\n' % repo_commit.decode('ascii'), |
| 359 | + ]) |
366 | 360 | return MyBuildPy
|
0 commit comments