diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2017-09-03 19:57:54 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2017-09-03 20:01:45 -0400 |
| commit | dcb24ad15465c266a3f258471766fbbe8fc8a42e (patch) | |
| tree | 13123440610d78e398476a8ce1e8cc3d9f9ec72e /bootstrap.py | |
| parent | f14930e66601b462699c44384c482cd966f53b8f (diff) | |
| parent | 1b192005562d5cf0de30c02154c58fd1dca577c8 (diff) | |
| download | python-setuptools-git-dcb24ad15465c266a3f258471766fbbe8fc8a42e.tar.gz | |
Merge branch 'master' into drop-py26
Diffstat (limited to 'bootstrap.py')
| -rw-r--r-- | bootstrap.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/bootstrap.py b/bootstrap.py index c5f470a4..8c7d7fc3 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -5,10 +5,14 @@ environment by creating a minimal egg-info directory and then invoking the egg-info command to flesh out the egg-info directory. """ +from __future__ import unicode_literals + import os import sys import textwrap import subprocess +import io + minimal_egg_info = textwrap.dedent(""" [distutils.commands] @@ -40,7 +44,7 @@ def build_egg_info(): """ os.mkdir('setuptools.egg-info') - with open('setuptools.egg-info/entry_points.txt', 'w') as ep: + with io.open('setuptools.egg-info/entry_points.txt', 'w') as ep: ep.write(minimal_egg_info) @@ -52,6 +56,9 @@ def run_egg_info(): subprocess.check_call(cmd) -if __name__ == '__main__': +def main(): ensure_egg_info() run_egg_info() + + +__name__ == '__main__' and main() |
