diff options
author | deshevoy <[email protected]> | 2022-02-10 16:46:56 +0300 |
---|---|---|
committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:46:56 +0300 |
commit | e988f30484abe5fdeedcc7a5d3c226c01a21800c (patch) | |
tree | 0a217b173aabb57b7e51f8a169989b1a3e0309fe /contrib/tools/python3 | |
parent | 33ee501c05d3f24036ae89766a858930ae66c548 (diff) |
Restoring authorship annotation for <[email protected]>. Commit 1 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 996edb2bdda..9024120b7ec 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 c767aad120b..b828798081d 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 7f591179ac4..b7c5de40e3f 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 64637cd287a..67e209433be 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() |