diff options
author | deshevoy <[email protected]> | 2022-02-10 16:46:57 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:46:57 +0300 |
commit | 28148f76dbfcc644d96427d41c92f36cbf2fdc6e (patch) | |
tree | b83306b6e37edeea782e9eed673d89286c4fef35 /contrib/tools/python3 | |
parent | e988f30484abe5fdeedcc7a5d3c226c01a21800c (diff) |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/tools/python3')
-rwxr-xr-x | contrib/tools/python3/pycc/main.py | 36 | ||||
-rw-r--r-- | contrib/tools/python3/src/Lib/ya.make | 4 | ||||
-rw-r--r-- | contrib/tools/python3/src/Python/pylifecycle.c | 2 | ||||
-rw-r--r-- | contrib/tools/python3/src/ya.make | 4 |
4 files changed, 23 insertions, 23 deletions
diff --git a/contrib/tools/python3/pycc/main.py b/contrib/tools/python3/pycc/main.py index 9024120b7ec..996edb2bdda 100755 --- a/contrib/tools/python3/pycc/main.py +++ b/contrib/tools/python3/pycc/main.py @@ -1,19 +1,19 @@ -import marshal -import sys - - -def main(): - srcpathx, in_fname, out_fname = sys.argv[1:] - srcpath = srcpathx[:-1] - - with open(in_fname, 'r', encoding='utf-8') as in_file: - source = in_file.read() - - code = compile(source, srcpath, 'exec', dont_inherit=True) - - with open(out_fname, 'wb') as out_file: - marshal.dump(code, out_file) - - +import marshal +import sys + + +def main(): + srcpathx, in_fname, out_fname = sys.argv[1:] + srcpath = srcpathx[:-1] + + with open(in_fname, 'r', encoding='utf-8') as in_file: + source = in_file.read() + + code = compile(source, srcpath, 'exec', dont_inherit=True) + + with open(out_fname, 'wb') as out_file: + marshal.dump(code, out_file) + + if __name__ == '__main__': - main() + main() diff --git a/contrib/tools/python3/src/Lib/ya.make b/contrib/tools/python3/src/Lib/ya.make index b828798081d..c767aad120b 100644 --- a/contrib/tools/python3/src/Lib/ya.make +++ b/contrib/tools/python3/src/Lib/ya.make @@ -1,6 +1,6 @@ ENABLE(PYBUILD_NO_PY) -PY3_LIBRARY() +PY3_LIBRARY() OWNER(g:contrib orivej) @@ -16,7 +16,7 @@ PEERDIR( ) PY_SRCS( - TOP_LEVEL + TOP_LEVEL __future__.py _aix_support.py _bootlocale.py diff --git a/contrib/tools/python3/src/Python/pylifecycle.c b/contrib/tools/python3/src/Python/pylifecycle.c index b7c5de40e3f..7f591179ac4 100644 --- a/contrib/tools/python3/src/Python/pylifecycle.c +++ b/contrib/tools/python3/src/Python/pylifecycle.c @@ -199,7 +199,7 @@ init_importlib_external(PyThreadState *tstate) if (value == NULL) { _PyErr_Print(tstate); return _PyStatus_ERR("external importer setup failed"); - } + } Py_DECREF(value); value = PyImport_ImportModule("__res"); diff --git a/contrib/tools/python3/src/ya.make b/contrib/tools/python3/src/ya.make index 67e209433be..64637cd287a 100644 --- a/contrib/tools/python3/src/ya.make +++ b/contrib/tools/python3/src/ya.make @@ -35,12 +35,12 @@ ELSEIF (OS_WINDOWS) Shlwapi.lib Winmm.lib ) - + CFLAGS( -DPY3_DLLNAME="L\"python3\"" ) - DISABLE(MSVC_INLINE_OPTIMIZED) + DISABLE(MSVC_INLINE_OPTIMIZED) ENDIF() NO_COMPILER_WARNINGS() |