aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/setuptools/py3/setuptools/launch.py
diff options
context:
space:
mode:
authorMikhail Borisov <borisov.mikhail@gmail.com>2022-02-10 16:45:40 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:40 +0300
commit5d50718e66d9c037dc587a0211110b7d25a66185 (patch)
treee98df59de24d2ef7c77baed9f41e4875a2fef972 /contrib/python/setuptools/py3/setuptools/launch.py
parenta6a92afe03e02795227d2641b49819b687f088f8 (diff)
downloadydb-5d50718e66d9c037dc587a0211110b7d25a66185.tar.gz
Restoring authorship annotation for Mikhail Borisov <borisov.mikhail@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/setuptools/py3/setuptools/launch.py')
-rw-r--r--contrib/python/setuptools/py3/setuptools/launch.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/contrib/python/setuptools/py3/setuptools/launch.py b/contrib/python/setuptools/py3/setuptools/launch.py
index 4d0600e539a..0208fdf33b6 100644
--- a/contrib/python/setuptools/py3/setuptools/launch.py
+++ b/contrib/python/setuptools/py3/setuptools/launch.py
@@ -1,16 +1,16 @@
-"""
-Launch the Python script on the command line after
-setuptools is bootstrapped via import.
-"""
-
-# Note that setuptools gets imported implicitly by the
-# invocation of this script using python -m setuptools.launch
-
-import tokenize
-import sys
-
-
-def run():
+"""
+Launch the Python script on the command line after
+setuptools is bootstrapped via import.
+"""
+
+# Note that setuptools gets imported implicitly by the
+# invocation of this script using python -m setuptools.launch
+
+import tokenize
+import sys
+
+
+def run():
"""
Run the script in sys.argv[1] as if it had
been invoked naturally.
@@ -23,14 +23,14 @@ def run():
__doc__=None,
)
sys.argv[:] = sys.argv[1:]
-
+
open_ = getattr(tokenize, 'open', open)
with open_(script_name) as fid:
script = fid.read()
norm_script = script.replace('\\r\\n', '\\n')
code = compile(norm_script, script_name, 'exec')
exec(code, namespace)
-
-
-if __name__ == '__main__':
+
+
+if __name__ == '__main__':
run()