aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/python
diff options
context:
space:
mode:
authormaxim-yurchuk <maxim-yurchuk@yandex-team.com>2024-10-09 12:29:46 +0300
committermaxim-yurchuk <maxim-yurchuk@yandex-team.com>2024-10-09 13:14:22 +0300
commit9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80 (patch)
treea8fb3181d5947c0d78cf402aa56e686130179049 /contrib/libs/python
parenta44b779cd359f06c3ebbef4ec98c6b38609d9d85 (diff)
downloadydb-9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80.tar.gz
publishFullContrib: true for ydb
<HIDDEN_URL> commit_hash:c82a80ac4594723cebf2c7387dec9c60217f603e
Diffstat (limited to 'contrib/libs/python')
-rw-r--r--contrib/libs/python/.yandex_meta/devtools.copyrights.report1
-rw-r--r--contrib/libs/python/.yandex_meta/devtools.licenses.custom.spdx.txt1
-rw-r--r--contrib/libs/python/.yandex_meta/devtools.licenses.report30
-rw-r--r--contrib/libs/python/Include/Python-ast.h7
-rw-r--r--contrib/libs/python/Include/asdl.h7
-rw-r--r--contrib/libs/python/Include/ast.h7
-rw-r--r--contrib/libs/python/Include/bitset.h7
-rw-r--r--contrib/libs/python/Include/bltinmodule.h7
-rw-r--r--contrib/libs/python/Include/boolobject.h7
-rw-r--r--contrib/libs/python/Include/bufferobject.h7
-rw-r--r--contrib/libs/python/Include/bytearrayobject.h7
-rw-r--r--contrib/libs/python/Include/bytes_methods.h7
-rw-r--r--contrib/libs/python/Include/bytesobject.h7
-rw-r--r--contrib/libs/python/Include/cStringIO.h7
-rw-r--r--contrib/libs/python/Include/cellobject.h7
-rw-r--r--contrib/libs/python/Include/ceval.h7
-rw-r--r--contrib/libs/python/Include/classobject.h7
-rw-r--r--contrib/libs/python/Include/cobject.h7
-rw-r--r--contrib/libs/python/Include/code.h7
-rw-r--r--contrib/libs/python/Include/codecs.h7
-rw-r--r--contrib/libs/python/Include/complexobject.h7
-rw-r--r--contrib/libs/python/Include/config_platform.h7
-rw-r--r--contrib/libs/python/Include/cpython/abstract.h7
-rw-r--r--contrib/libs/python/Include/cpython/bytearrayobject.h7
-rw-r--r--contrib/libs/python/Include/cpython/bytesobject.h7
-rw-r--r--contrib/libs/python/Include/cpython/cellobject.h7
-rw-r--r--contrib/libs/python/Include/cpython/ceval.h7
-rw-r--r--contrib/libs/python/Include/cpython/classobject.h7
-rw-r--r--contrib/libs/python/Include/cpython/code.h7
-rw-r--r--contrib/libs/python/Include/cpython/compile.h7
-rw-r--r--contrib/libs/python/Include/cpython/complexobject.h7
-rw-r--r--contrib/libs/python/Include/cpython/context.h7
-rw-r--r--contrib/libs/python/Include/cpython/descrobject.h7
-rw-r--r--contrib/libs/python/Include/cpython/dictobject.h7
-rw-r--r--contrib/libs/python/Include/cpython/fileobject.h7
-rw-r--r--contrib/libs/python/Include/cpython/fileutils.h7
-rw-r--r--contrib/libs/python/Include/cpython/floatobject.h7
-rw-r--r--contrib/libs/python/Include/cpython/frameobject.h7
-rw-r--r--contrib/libs/python/Include/cpython/funcobject.h7
-rw-r--r--contrib/libs/python/Include/cpython/genobject.h7
-rw-r--r--contrib/libs/python/Include/cpython/import.h7
-rw-r--r--contrib/libs/python/Include/cpython/initconfig.h7
-rw-r--r--contrib/libs/python/Include/cpython/interpreteridobject.h7
-rw-r--r--contrib/libs/python/Include/cpython/listobject.h7
-rw-r--r--contrib/libs/python/Include/cpython/longintrepr.h7
-rw-r--r--contrib/libs/python/Include/cpython/longobject.h7
-rw-r--r--contrib/libs/python/Include/cpython/memoryobject.h7
-rw-r--r--contrib/libs/python/Include/cpython/methodobject.h7
-rw-r--r--contrib/libs/python/Include/cpython/modsupport.h7
-rw-r--r--contrib/libs/python/Include/cpython/object.h7
-rw-r--r--contrib/libs/python/Include/cpython/objimpl.h7
-rw-r--r--contrib/libs/python/Include/cpython/odictobject.h7
-rw-r--r--contrib/libs/python/Include/cpython/picklebufobject.h7
-rw-r--r--contrib/libs/python/Include/cpython/pthread_stubs.h7
-rw-r--r--contrib/libs/python/Include/cpython/pyctype.h7
-rw-r--r--contrib/libs/python/Include/cpython/pydebug.h7
-rw-r--r--contrib/libs/python/Include/cpython/pyerrors.h7
-rw-r--r--contrib/libs/python/Include/cpython/pyfpe.h7
-rw-r--r--contrib/libs/python/Include/cpython/pyframe.h7
-rw-r--r--contrib/libs/python/Include/cpython/pylifecycle.h7
-rw-r--r--contrib/libs/python/Include/cpython/pymem.h7
-rw-r--r--contrib/libs/python/Include/cpython/pystate.h7
-rw-r--r--contrib/libs/python/Include/cpython/pythonrun.h7
-rw-r--r--contrib/libs/python/Include/cpython/pythread.h7
-rw-r--r--contrib/libs/python/Include/cpython/pytime.h7
-rw-r--r--contrib/libs/python/Include/cpython/setobject.h7
-rw-r--r--contrib/libs/python/Include/cpython/sysmodule.h7
-rw-r--r--contrib/libs/python/Include/cpython/traceback.h7
-rw-r--r--contrib/libs/python/Include/cpython/tupleobject.h7
-rw-r--r--contrib/libs/python/Include/cpython/unicodeobject.h7
-rw-r--r--contrib/libs/python/Include/cpython/warnings.h7
-rw-r--r--contrib/libs/python/Include/cpython/weakrefobject.h7
-rw-r--r--contrib/libs/python/Include/dictobject.h7
-rw-r--r--contrib/libs/python/Include/dtoa.h7
-rw-r--r--contrib/libs/python/Include/dynamic_annotations.h7
-rw-r--r--contrib/libs/python/Include/enumobject.h7
-rw-r--r--contrib/libs/python/Include/errcode.h7
-rw-r--r--contrib/libs/python/Include/eval.h7
-rw-r--r--contrib/libs/python/Include/exports.h7
-rw-r--r--contrib/libs/python/Include/fileobject.h7
-rw-r--r--contrib/libs/python/Include/fileutils.h7
-rw-r--r--contrib/libs/python/Include/floatobject.h7
-rw-r--r--contrib/libs/python/Include/funcobject.h7
-rw-r--r--contrib/libs/python/Include/genericaliasobject.h7
-rw-r--r--contrib/libs/python/Include/genobject.h7
-rw-r--r--contrib/libs/python/Include/graminit.h7
-rw-r--r--contrib/libs/python/Include/grammar.h7
-rw-r--r--contrib/libs/python/Include/import.h7
-rw-r--r--contrib/libs/python/Include/interpreteridobject.h7
-rw-r--r--contrib/libs/python/Include/intobject.h7
-rw-r--r--contrib/libs/python/Include/intrcheck.h7
-rw-r--r--contrib/libs/python/Include/iterobject.h7
-rw-r--r--contrib/libs/python/Include/listobject.h7
-rw-r--r--contrib/libs/python/Include/longobject.h7
-rw-r--r--contrib/libs/python/Include/marshal.h7
-rw-r--r--contrib/libs/python/Include/memoryobject.h7
-rw-r--r--contrib/libs/python/Include/metagrammar.h7
-rw-r--r--contrib/libs/python/Include/methodobject.h7
-rw-r--r--contrib/libs/python/Include/modsupport.h7
-rw-r--r--contrib/libs/python/Include/moduleobject.h7
-rw-r--r--contrib/libs/python/Include/node.h7
-rw-r--r--contrib/libs/python/Include/object.h7
-rw-r--r--contrib/libs/python/Include/objimpl.h7
-rw-r--r--contrib/libs/python/Include/opcode.h7
-rw-r--r--contrib/libs/python/Include/osdefs.h7
-rw-r--r--contrib/libs/python/Include/osmodule.h7
-rw-r--r--contrib/libs/python/Include/parsetok.h7
-rw-r--r--contrib/libs/python/Include/patchlevel.h7
-rw-r--r--contrib/libs/python/Include/pgen.h7
-rw-r--r--contrib/libs/python/Include/pgenheaders.h7
-rw-r--r--contrib/libs/python/Include/py_curses.h7
-rw-r--r--contrib/libs/python/Include/pyarena.h7
-rw-r--r--contrib/libs/python/Include/pybuffer.h7
-rw-r--r--contrib/libs/python/Include/pycapsule.h7
-rw-r--r--contrib/libs/python/Include/pyctype.h7
-rw-r--r--contrib/libs/python/Include/pydebug.h7
-rw-r--r--contrib/libs/python/Include/pydtrace.h7
-rw-r--r--contrib/libs/python/Include/pyexpat.h7
-rw-r--r--contrib/libs/python/Include/pyfpe.h7
-rw-r--r--contrib/libs/python/Include/pyframe.h7
-rw-r--r--contrib/libs/python/Include/pygetopt.h7
-rw-r--r--contrib/libs/python/Include/pyhash.h7
-rw-r--r--contrib/libs/python/Include/pylifecycle.h7
-rw-r--r--contrib/libs/python/Include/pymacconfig.h7
-rw-r--r--contrib/libs/python/Include/pymacro.h7
-rw-r--r--contrib/libs/python/Include/pymactoolbox.h7
-rw-r--r--contrib/libs/python/Include/pymath.h7
-rw-r--r--contrib/libs/python/Include/pyport.h7
-rw-r--r--contrib/libs/python/Include/pystats.h7
-rw-r--r--contrib/libs/python/Include/pystrcmp.h7
-rw-r--r--contrib/libs/python/Include/pystrtod.h7
-rw-r--r--contrib/libs/python/Include/pythonrun.h7
-rw-r--r--contrib/libs/python/Include/pytypedefs.h7
-rw-r--r--contrib/libs/python/Include/rangeobject.h7
-rw-r--r--contrib/libs/python/Include/setobject.h7
-rw-r--r--contrib/libs/python/Include/sliceobject.h7
-rw-r--r--contrib/libs/python/Include/stringobject.h7
-rw-r--r--contrib/libs/python/Include/symtable.h7
-rw-r--r--contrib/libs/python/Include/sysmodule.h7
-rw-r--r--contrib/libs/python/Include/timefuncs.h7
-rw-r--r--contrib/libs/python/Include/token.h7
-rw-r--r--contrib/libs/python/Include/tracemalloc.h7
-rw-r--r--contrib/libs/python/Include/tupleobject.h7
-rw-r--r--contrib/libs/python/Include/typeslots.h7
-rw-r--r--contrib/libs/python/Include/ucnhash.h7
-rw-r--r--contrib/libs/python/Include/warnings.h7
-rw-r--r--contrib/libs/python/Include/weakrefobject.h7
-rwxr-xr-xcontrib/libs/python/gen_includes.py67
-rw-r--r--contrib/libs/python/ut/lib/test.cpp21
-rw-r--r--contrib/libs/python/ut/lib/test.h7
-rw-r--r--contrib/libs/python/ut/lib/ya.make19
-rw-r--r--contrib/libs/python/ut/py2/use.cpp10
-rw-r--r--contrib/libs/python/ut/py2/ya.make9
-rw-r--r--contrib/libs/python/ut/py3/use.cpp10
-rw-r--r--contrib/libs/python/ut/py3/ya.make10
-rw-r--r--contrib/libs/python/ut/ya.make7
156 files changed, 1200 insertions, 0 deletions
diff --git a/contrib/libs/python/.yandex_meta/devtools.copyrights.report b/contrib/libs/python/.yandex_meta/devtools.copyrights.report
new file mode 100644
index 0000000000..8b13789179
--- /dev/null
+++ b/contrib/libs/python/.yandex_meta/devtools.copyrights.report
@@ -0,0 +1 @@
+
diff --git a/contrib/libs/python/.yandex_meta/devtools.licenses.custom.spdx.txt b/contrib/libs/python/.yandex_meta/devtools.licenses.custom.spdx.txt
new file mode 100644
index 0000000000..279a5f0748
--- /dev/null
+++ b/contrib/libs/python/.yandex_meta/devtools.licenses.custom.spdx.txt
@@ -0,0 +1 @@
+YandexOpen
diff --git a/contrib/libs/python/.yandex_meta/devtools.licenses.report b/contrib/libs/python/.yandex_meta/devtools.licenses.report
new file mode 100644
index 0000000000..cb930522cc
--- /dev/null
+++ b/contrib/libs/python/.yandex_meta/devtools.licenses.report
@@ -0,0 +1,30 @@
+# File format ($ symbol means the beginning of a line):
+#
+# $ # this message
+# $ # =======================
+# $ # comments (all commentaries should starts with some number of spaces and # symbol)
+# ${action} {license spdx} {license text hash}
+# $BELONGS ./ya/make/file/relative/path/1/ya.make ./ya/make/2/ya.make
+# ${all_file_action} filename
+# $ # user commentaries (many lines)
+# $ generated description - files with this license, license text... (some number of lines that starts with some number of spaces, do not modify)
+# ${action} {license spdx} {license text hash}
+# $BELONGS ./ya/make/file/relative/path/3/ya.make
+# ${all_file_action} filename
+# $ # user commentaries
+# $ generated description
+# $ ...
+#
+# You can modify action, all_file_action and add commentaries
+# Available actions:
+# keep - keep license in contrib and use in credits
+# skip - skip license
+# remove - remove all files with this license
+# rename - save license text/links into licenses texts file, but not store SPDX into LINCENSE macro. You should store correct license id into devtools.license.spdx.txt file
+#
+# {all file action} records will be generated when license text contains filename that exists on filesystem (in contrib directory)
+# We suppose that that files can contain some license info
+# Available all file actions:
+# FILE_IGNORE - ignore file (do nothing)
+# FILE_INCLUDE - include all file data into licenses text file
+# =======================
diff --git a/contrib/libs/python/Include/Python-ast.h b/contrib/libs/python/Include/Python-ast.h
new file mode 100644
index 0000000000..488b102d43
--- /dev/null
+++ b/contrib/libs/python/Include/Python-ast.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <Python-ast.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/Python-ast.h>
+#endif
diff --git a/contrib/libs/python/Include/asdl.h b/contrib/libs/python/Include/asdl.h
new file mode 100644
index 0000000000..445c6f4429
--- /dev/null
+++ b/contrib/libs/python/Include/asdl.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <asdl.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/asdl.h>
+#endif
diff --git a/contrib/libs/python/Include/ast.h b/contrib/libs/python/Include/ast.h
new file mode 100644
index 0000000000..b093182661
--- /dev/null
+++ b/contrib/libs/python/Include/ast.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <ast.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/ast.h>
+#endif
diff --git a/contrib/libs/python/Include/bitset.h b/contrib/libs/python/Include/bitset.h
new file mode 100644
index 0000000000..35c9fbd35d
--- /dev/null
+++ b/contrib/libs/python/Include/bitset.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <bitset.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/bitset.h>
+#endif
diff --git a/contrib/libs/python/Include/bltinmodule.h b/contrib/libs/python/Include/bltinmodule.h
new file mode 100644
index 0000000000..1c155e7da3
--- /dev/null
+++ b/contrib/libs/python/Include/bltinmodule.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/bltinmodule.h>
+#else
+#error "No <bltinmodule.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/boolobject.h b/contrib/libs/python/Include/boolobject.h
new file mode 100644
index 0000000000..e3ef8a1a3b
--- /dev/null
+++ b/contrib/libs/python/Include/boolobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/boolobject.h>
+#else
+#include <contrib/tools/python/src/Include/boolobject.h>
+#endif
diff --git a/contrib/libs/python/Include/bufferobject.h b/contrib/libs/python/Include/bufferobject.h
new file mode 100644
index 0000000000..aed38f50a9
--- /dev/null
+++ b/contrib/libs/python/Include/bufferobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <bufferobject.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/bufferobject.h>
+#endif
diff --git a/contrib/libs/python/Include/bytearrayobject.h b/contrib/libs/python/Include/bytearrayobject.h
new file mode 100644
index 0000000000..b60460a188
--- /dev/null
+++ b/contrib/libs/python/Include/bytearrayobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/bytearrayobject.h>
+#else
+#include <contrib/tools/python/src/Include/bytearrayobject.h>
+#endif
diff --git a/contrib/libs/python/Include/bytes_methods.h b/contrib/libs/python/Include/bytes_methods.h
new file mode 100644
index 0000000000..f74e146029
--- /dev/null
+++ b/contrib/libs/python/Include/bytes_methods.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <bytes_methods.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/bytes_methods.h>
+#endif
diff --git a/contrib/libs/python/Include/bytesobject.h b/contrib/libs/python/Include/bytesobject.h
new file mode 100644
index 0000000000..d015170cc5
--- /dev/null
+++ b/contrib/libs/python/Include/bytesobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/bytesobject.h>
+#else
+#include <contrib/tools/python/src/Include/bytesobject.h>
+#endif
diff --git a/contrib/libs/python/Include/cStringIO.h b/contrib/libs/python/Include/cStringIO.h
new file mode 100644
index 0000000000..3a8a908d56
--- /dev/null
+++ b/contrib/libs/python/Include/cStringIO.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <cStringIO.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/cStringIO.h>
+#endif
diff --git a/contrib/libs/python/Include/cellobject.h b/contrib/libs/python/Include/cellobject.h
new file mode 100644
index 0000000000..df65ffc1a1
--- /dev/null
+++ b/contrib/libs/python/Include/cellobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <cellobject.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/cellobject.h>
+#endif
diff --git a/contrib/libs/python/Include/ceval.h b/contrib/libs/python/Include/ceval.h
new file mode 100644
index 0000000000..264f66c02f
--- /dev/null
+++ b/contrib/libs/python/Include/ceval.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/ceval.h>
+#else
+#include <contrib/tools/python/src/Include/ceval.h>
+#endif
diff --git a/contrib/libs/python/Include/classobject.h b/contrib/libs/python/Include/classobject.h
new file mode 100644
index 0000000000..4f3c439451
--- /dev/null
+++ b/contrib/libs/python/Include/classobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <classobject.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/classobject.h>
+#endif
diff --git a/contrib/libs/python/Include/cobject.h b/contrib/libs/python/Include/cobject.h
new file mode 100644
index 0000000000..8fd2754e01
--- /dev/null
+++ b/contrib/libs/python/Include/cobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <cobject.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/cobject.h>
+#endif
diff --git a/contrib/libs/python/Include/code.h b/contrib/libs/python/Include/code.h
new file mode 100644
index 0000000000..cb0b642826
--- /dev/null
+++ b/contrib/libs/python/Include/code.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <code.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/code.h>
+#endif
diff --git a/contrib/libs/python/Include/codecs.h b/contrib/libs/python/Include/codecs.h
new file mode 100644
index 0000000000..aa1b76e3a4
--- /dev/null
+++ b/contrib/libs/python/Include/codecs.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/codecs.h>
+#else
+#include <contrib/tools/python/src/Include/codecs.h>
+#endif
diff --git a/contrib/libs/python/Include/complexobject.h b/contrib/libs/python/Include/complexobject.h
new file mode 100644
index 0000000000..8df302907c
--- /dev/null
+++ b/contrib/libs/python/Include/complexobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/complexobject.h>
+#else
+#include <contrib/tools/python/src/Include/complexobject.h>
+#endif
diff --git a/contrib/libs/python/Include/config_platform.h b/contrib/libs/python/Include/config_platform.h
new file mode 100644
index 0000000000..afd9bf5123
--- /dev/null
+++ b/contrib/libs/python/Include/config_platform.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <config_platform.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/config_platform.h>
+#endif
diff --git a/contrib/libs/python/Include/cpython/abstract.h b/contrib/libs/python/Include/cpython/abstract.h
new file mode 100644
index 0000000000..091e503fd6
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/abstract.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/abstract.h>
+#else
+#error "No <cpython/abstract.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/bytearrayobject.h b/contrib/libs/python/Include/cpython/bytearrayobject.h
new file mode 100644
index 0000000000..0cf8065877
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/bytearrayobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/bytearrayobject.h>
+#else
+#error "No <cpython/bytearrayobject.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/bytesobject.h b/contrib/libs/python/Include/cpython/bytesobject.h
new file mode 100644
index 0000000000..b63ab5f3b3
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/bytesobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/bytesobject.h>
+#else
+#error "No <cpython/bytesobject.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/cellobject.h b/contrib/libs/python/Include/cpython/cellobject.h
new file mode 100644
index 0000000000..5168a47c55
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/cellobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/cellobject.h>
+#else
+#error "No <cpython/cellobject.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/ceval.h b/contrib/libs/python/Include/cpython/ceval.h
new file mode 100644
index 0000000000..b4b752fcf4
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/ceval.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/ceval.h>
+#else
+#error "No <cpython/ceval.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/classobject.h b/contrib/libs/python/Include/cpython/classobject.h
new file mode 100644
index 0000000000..328ba02918
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/classobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/classobject.h>
+#else
+#error "No <cpython/classobject.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/code.h b/contrib/libs/python/Include/cpython/code.h
new file mode 100644
index 0000000000..fbb2e0773b
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/code.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/code.h>
+#else
+#error "No <cpython/code.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/compile.h b/contrib/libs/python/Include/cpython/compile.h
new file mode 100644
index 0000000000..f11b7291af
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/compile.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/compile.h>
+#else
+#error "No <cpython/compile.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/complexobject.h b/contrib/libs/python/Include/cpython/complexobject.h
new file mode 100644
index 0000000000..14255ca2a4
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/complexobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/complexobject.h>
+#else
+#error "No <cpython/complexobject.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/context.h b/contrib/libs/python/Include/cpython/context.h
new file mode 100644
index 0000000000..fb0bc6264c
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/context.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/context.h>
+#else
+#error "No <cpython/context.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/descrobject.h b/contrib/libs/python/Include/cpython/descrobject.h
new file mode 100644
index 0000000000..5225345147
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/descrobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/descrobject.h>
+#else
+#error "No <cpython/descrobject.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/dictobject.h b/contrib/libs/python/Include/cpython/dictobject.h
new file mode 100644
index 0000000000..c2665c21d4
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/dictobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/dictobject.h>
+#else
+#error "No <cpython/dictobject.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/fileobject.h b/contrib/libs/python/Include/cpython/fileobject.h
new file mode 100644
index 0000000000..e2267c7814
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/fileobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/fileobject.h>
+#else
+#error "No <cpython/fileobject.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/fileutils.h b/contrib/libs/python/Include/cpython/fileutils.h
new file mode 100644
index 0000000000..be06f6826e
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/fileutils.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/fileutils.h>
+#else
+#error "No <cpython/fileutils.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/floatobject.h b/contrib/libs/python/Include/cpython/floatobject.h
new file mode 100644
index 0000000000..6665001c7a
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/floatobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/floatobject.h>
+#else
+#error "No <cpython/floatobject.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/frameobject.h b/contrib/libs/python/Include/cpython/frameobject.h
new file mode 100644
index 0000000000..5c50eaf204
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/frameobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/frameobject.h>
+#else
+#error "No <cpython/frameobject.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/funcobject.h b/contrib/libs/python/Include/cpython/funcobject.h
new file mode 100644
index 0000000000..6f0891e115
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/funcobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/funcobject.h>
+#else
+#error "No <cpython/funcobject.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/genobject.h b/contrib/libs/python/Include/cpython/genobject.h
new file mode 100644
index 0000000000..5a93c84dd1
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/genobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/genobject.h>
+#else
+#error "No <cpython/genobject.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/import.h b/contrib/libs/python/Include/cpython/import.h
new file mode 100644
index 0000000000..9eaf6d0aa4
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/import.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/import.h>
+#else
+#error "No <cpython/import.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/initconfig.h b/contrib/libs/python/Include/cpython/initconfig.h
new file mode 100644
index 0000000000..a1f347678b
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/initconfig.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/initconfig.h>
+#else
+#error "No <cpython/initconfig.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/interpreteridobject.h b/contrib/libs/python/Include/cpython/interpreteridobject.h
new file mode 100644
index 0000000000..c73f79e9b0
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/interpreteridobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/interpreteridobject.h>
+#else
+#error "No <cpython/interpreteridobject.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/listobject.h b/contrib/libs/python/Include/cpython/listobject.h
new file mode 100644
index 0000000000..1f4768447f
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/listobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/listobject.h>
+#else
+#error "No <cpython/listobject.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/longintrepr.h b/contrib/libs/python/Include/cpython/longintrepr.h
new file mode 100644
index 0000000000..73d0184bf9
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/longintrepr.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/longintrepr.h>
+#else
+#error "No <cpython/longintrepr.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/longobject.h b/contrib/libs/python/Include/cpython/longobject.h
new file mode 100644
index 0000000000..c89cdec8ec
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/longobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/longobject.h>
+#else
+#error "No <cpython/longobject.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/memoryobject.h b/contrib/libs/python/Include/cpython/memoryobject.h
new file mode 100644
index 0000000000..24c212f367
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/memoryobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/memoryobject.h>
+#else
+#error "No <cpython/memoryobject.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/methodobject.h b/contrib/libs/python/Include/cpython/methodobject.h
new file mode 100644
index 0000000000..0555cf051b
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/methodobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/methodobject.h>
+#else
+#error "No <cpython/methodobject.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/modsupport.h b/contrib/libs/python/Include/cpython/modsupport.h
new file mode 100644
index 0000000000..78edd7410e
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/modsupport.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/modsupport.h>
+#else
+#error "No <cpython/modsupport.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/object.h b/contrib/libs/python/Include/cpython/object.h
new file mode 100644
index 0000000000..5fb33ff87e
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/object.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/object.h>
+#else
+#error "No <cpython/object.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/objimpl.h b/contrib/libs/python/Include/cpython/objimpl.h
new file mode 100644
index 0000000000..1b60476e50
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/objimpl.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/objimpl.h>
+#else
+#error "No <cpython/objimpl.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/odictobject.h b/contrib/libs/python/Include/cpython/odictobject.h
new file mode 100644
index 0000000000..7fcc7130f9
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/odictobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/odictobject.h>
+#else
+#error "No <cpython/odictobject.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/picklebufobject.h b/contrib/libs/python/Include/cpython/picklebufobject.h
new file mode 100644
index 0000000000..15cb201e99
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/picklebufobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/picklebufobject.h>
+#else
+#error "No <cpython/picklebufobject.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/pthread_stubs.h b/contrib/libs/python/Include/cpython/pthread_stubs.h
new file mode 100644
index 0000000000..96d5da5273
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/pthread_stubs.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/pthread_stubs.h>
+#else
+#error "No <cpython/pthread_stubs.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/pyctype.h b/contrib/libs/python/Include/cpython/pyctype.h
new file mode 100644
index 0000000000..175ff22df7
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/pyctype.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/pyctype.h>
+#else
+#error "No <cpython/pyctype.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/pydebug.h b/contrib/libs/python/Include/cpython/pydebug.h
new file mode 100644
index 0000000000..4169d56a88
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/pydebug.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/pydebug.h>
+#else
+#error "No <cpython/pydebug.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/pyerrors.h b/contrib/libs/python/Include/cpython/pyerrors.h
new file mode 100644
index 0000000000..906d99775a
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/pyerrors.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/pyerrors.h>
+#else
+#error "No <cpython/pyerrors.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/pyfpe.h b/contrib/libs/python/Include/cpython/pyfpe.h
new file mode 100644
index 0000000000..24e1ce7056
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/pyfpe.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/pyfpe.h>
+#else
+#error "No <cpython/pyfpe.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/pyframe.h b/contrib/libs/python/Include/cpython/pyframe.h
new file mode 100644
index 0000000000..1de542b371
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/pyframe.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/pyframe.h>
+#else
+#error "No <cpython/pyframe.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/pylifecycle.h b/contrib/libs/python/Include/cpython/pylifecycle.h
new file mode 100644
index 0000000000..9f30e1829a
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/pylifecycle.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/pylifecycle.h>
+#else
+#error "No <cpython/pylifecycle.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/pymem.h b/contrib/libs/python/Include/cpython/pymem.h
new file mode 100644
index 0000000000..5301b257b0
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/pymem.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/pymem.h>
+#else
+#error "No <cpython/pymem.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/pystate.h b/contrib/libs/python/Include/cpython/pystate.h
new file mode 100644
index 0000000000..907759298c
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/pystate.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/pystate.h>
+#else
+#error "No <cpython/pystate.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/pythonrun.h b/contrib/libs/python/Include/cpython/pythonrun.h
new file mode 100644
index 0000000000..b1c9393594
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/pythonrun.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/pythonrun.h>
+#else
+#error "No <cpython/pythonrun.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/pythread.h b/contrib/libs/python/Include/cpython/pythread.h
new file mode 100644
index 0000000000..9471f094ab
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/pythread.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/pythread.h>
+#else
+#error "No <cpython/pythread.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/pytime.h b/contrib/libs/python/Include/cpython/pytime.h
new file mode 100644
index 0000000000..359daeadd6
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/pytime.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/pytime.h>
+#else
+#error "No <cpython/pytime.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/setobject.h b/contrib/libs/python/Include/cpython/setobject.h
new file mode 100644
index 0000000000..ed925494f6
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/setobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/setobject.h>
+#else
+#error "No <cpython/setobject.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/sysmodule.h b/contrib/libs/python/Include/cpython/sysmodule.h
new file mode 100644
index 0000000000..6450ed88fc
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/sysmodule.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/sysmodule.h>
+#else
+#error "No <cpython/sysmodule.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/traceback.h b/contrib/libs/python/Include/cpython/traceback.h
new file mode 100644
index 0000000000..3c3896f808
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/traceback.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/traceback.h>
+#else
+#error "No <cpython/traceback.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/tupleobject.h b/contrib/libs/python/Include/cpython/tupleobject.h
new file mode 100644
index 0000000000..2dbdac228f
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/tupleobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/tupleobject.h>
+#else
+#error "No <cpython/tupleobject.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/unicodeobject.h b/contrib/libs/python/Include/cpython/unicodeobject.h
new file mode 100644
index 0000000000..5a581efbf6
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/unicodeobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/unicodeobject.h>
+#else
+#error "No <cpython/unicodeobject.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/warnings.h b/contrib/libs/python/Include/cpython/warnings.h
new file mode 100644
index 0000000000..4fb943deff
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/warnings.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/warnings.h>
+#else
+#error "No <cpython/warnings.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/cpython/weakrefobject.h b/contrib/libs/python/Include/cpython/weakrefobject.h
new file mode 100644
index 0000000000..8b9407d177
--- /dev/null
+++ b/contrib/libs/python/Include/cpython/weakrefobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/cpython/weakrefobject.h>
+#else
+#error "No <cpython/weakrefobject.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/dictobject.h b/contrib/libs/python/Include/dictobject.h
new file mode 100644
index 0000000000..75e3685197
--- /dev/null
+++ b/contrib/libs/python/Include/dictobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/dictobject.h>
+#else
+#include <contrib/tools/python/src/Include/dictobject.h>
+#endif
diff --git a/contrib/libs/python/Include/dtoa.h b/contrib/libs/python/Include/dtoa.h
new file mode 100644
index 0000000000..d8c51a71f4
--- /dev/null
+++ b/contrib/libs/python/Include/dtoa.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <dtoa.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/dtoa.h>
+#endif
diff --git a/contrib/libs/python/Include/dynamic_annotations.h b/contrib/libs/python/Include/dynamic_annotations.h
new file mode 100644
index 0000000000..11ceb3efec
--- /dev/null
+++ b/contrib/libs/python/Include/dynamic_annotations.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/dynamic_annotations.h>
+#else
+#error "No <dynamic_annotations.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/enumobject.h b/contrib/libs/python/Include/enumobject.h
new file mode 100644
index 0000000000..069967325a
--- /dev/null
+++ b/contrib/libs/python/Include/enumobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/enumobject.h>
+#else
+#include <contrib/tools/python/src/Include/enumobject.h>
+#endif
diff --git a/contrib/libs/python/Include/errcode.h b/contrib/libs/python/Include/errcode.h
new file mode 100644
index 0000000000..0716dc2e15
--- /dev/null
+++ b/contrib/libs/python/Include/errcode.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/errcode.h>
+#else
+#include <contrib/tools/python/src/Include/errcode.h>
+#endif
diff --git a/contrib/libs/python/Include/eval.h b/contrib/libs/python/Include/eval.h
new file mode 100644
index 0000000000..56aaf6cc48
--- /dev/null
+++ b/contrib/libs/python/Include/eval.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <eval.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/eval.h>
+#endif
diff --git a/contrib/libs/python/Include/exports.h b/contrib/libs/python/Include/exports.h
new file mode 100644
index 0000000000..42349d9bba
--- /dev/null
+++ b/contrib/libs/python/Include/exports.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/exports.h>
+#else
+#error "No <exports.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/fileobject.h b/contrib/libs/python/Include/fileobject.h
new file mode 100644
index 0000000000..c669c8094a
--- /dev/null
+++ b/contrib/libs/python/Include/fileobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/fileobject.h>
+#else
+#include <contrib/tools/python/src/Include/fileobject.h>
+#endif
diff --git a/contrib/libs/python/Include/fileutils.h b/contrib/libs/python/Include/fileutils.h
new file mode 100644
index 0000000000..402c623c63
--- /dev/null
+++ b/contrib/libs/python/Include/fileutils.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/fileutils.h>
+#else
+#error "No <fileutils.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/floatobject.h b/contrib/libs/python/Include/floatobject.h
new file mode 100644
index 0000000000..f8c3e7aba2
--- /dev/null
+++ b/contrib/libs/python/Include/floatobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/floatobject.h>
+#else
+#include <contrib/tools/python/src/Include/floatobject.h>
+#endif
diff --git a/contrib/libs/python/Include/funcobject.h b/contrib/libs/python/Include/funcobject.h
new file mode 100644
index 0000000000..b227744af7
--- /dev/null
+++ b/contrib/libs/python/Include/funcobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <funcobject.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/funcobject.h>
+#endif
diff --git a/contrib/libs/python/Include/genericaliasobject.h b/contrib/libs/python/Include/genericaliasobject.h
new file mode 100644
index 0000000000..d22f810c22
--- /dev/null
+++ b/contrib/libs/python/Include/genericaliasobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/genericaliasobject.h>
+#else
+#error "No <genericaliasobject.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/genobject.h b/contrib/libs/python/Include/genobject.h
new file mode 100644
index 0000000000..cb7fa8e4ef
--- /dev/null
+++ b/contrib/libs/python/Include/genobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <genobject.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/genobject.h>
+#endif
diff --git a/contrib/libs/python/Include/graminit.h b/contrib/libs/python/Include/graminit.h
new file mode 100644
index 0000000000..3b23525aba
--- /dev/null
+++ b/contrib/libs/python/Include/graminit.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <graminit.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/graminit.h>
+#endif
diff --git a/contrib/libs/python/Include/grammar.h b/contrib/libs/python/Include/grammar.h
new file mode 100644
index 0000000000..947710d0bc
--- /dev/null
+++ b/contrib/libs/python/Include/grammar.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <grammar.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/grammar.h>
+#endif
diff --git a/contrib/libs/python/Include/import.h b/contrib/libs/python/Include/import.h
new file mode 100644
index 0000000000..6df7b664f9
--- /dev/null
+++ b/contrib/libs/python/Include/import.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/import.h>
+#else
+#include <contrib/tools/python/src/Include/import.h>
+#endif
diff --git a/contrib/libs/python/Include/interpreteridobject.h b/contrib/libs/python/Include/interpreteridobject.h
new file mode 100644
index 0000000000..00d6e4e774
--- /dev/null
+++ b/contrib/libs/python/Include/interpreteridobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/interpreteridobject.h>
+#else
+#error "No <interpreteridobject.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/intobject.h b/contrib/libs/python/Include/intobject.h
new file mode 100644
index 0000000000..4ec1b915df
--- /dev/null
+++ b/contrib/libs/python/Include/intobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <intobject.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/intobject.h>
+#endif
diff --git a/contrib/libs/python/Include/intrcheck.h b/contrib/libs/python/Include/intrcheck.h
new file mode 100644
index 0000000000..f39bcb90cb
--- /dev/null
+++ b/contrib/libs/python/Include/intrcheck.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/intrcheck.h>
+#else
+#include <contrib/tools/python/src/Include/intrcheck.h>
+#endif
diff --git a/contrib/libs/python/Include/iterobject.h b/contrib/libs/python/Include/iterobject.h
new file mode 100644
index 0000000000..a1ad7c5889
--- /dev/null
+++ b/contrib/libs/python/Include/iterobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/iterobject.h>
+#else
+#include <contrib/tools/python/src/Include/iterobject.h>
+#endif
diff --git a/contrib/libs/python/Include/listobject.h b/contrib/libs/python/Include/listobject.h
new file mode 100644
index 0000000000..c1b9b08cf8
--- /dev/null
+++ b/contrib/libs/python/Include/listobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/listobject.h>
+#else
+#include <contrib/tools/python/src/Include/listobject.h>
+#endif
diff --git a/contrib/libs/python/Include/longobject.h b/contrib/libs/python/Include/longobject.h
new file mode 100644
index 0000000000..3bdaa94f51
--- /dev/null
+++ b/contrib/libs/python/Include/longobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/longobject.h>
+#else
+#include <contrib/tools/python/src/Include/longobject.h>
+#endif
diff --git a/contrib/libs/python/Include/marshal.h b/contrib/libs/python/Include/marshal.h
new file mode 100644
index 0000000000..990e0b38c7
--- /dev/null
+++ b/contrib/libs/python/Include/marshal.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/marshal.h>
+#else
+#include <contrib/tools/python/src/Include/marshal.h>
+#endif
diff --git a/contrib/libs/python/Include/memoryobject.h b/contrib/libs/python/Include/memoryobject.h
new file mode 100644
index 0000000000..0d4af17602
--- /dev/null
+++ b/contrib/libs/python/Include/memoryobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/memoryobject.h>
+#else
+#include <contrib/tools/python/src/Include/memoryobject.h>
+#endif
diff --git a/contrib/libs/python/Include/metagrammar.h b/contrib/libs/python/Include/metagrammar.h
new file mode 100644
index 0000000000..ab897e3820
--- /dev/null
+++ b/contrib/libs/python/Include/metagrammar.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <metagrammar.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/metagrammar.h>
+#endif
diff --git a/contrib/libs/python/Include/methodobject.h b/contrib/libs/python/Include/methodobject.h
new file mode 100644
index 0000000000..d8fe956549
--- /dev/null
+++ b/contrib/libs/python/Include/methodobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/methodobject.h>
+#else
+#include <contrib/tools/python/src/Include/methodobject.h>
+#endif
diff --git a/contrib/libs/python/Include/modsupport.h b/contrib/libs/python/Include/modsupport.h
new file mode 100644
index 0000000000..04b6ba8373
--- /dev/null
+++ b/contrib/libs/python/Include/modsupport.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/modsupport.h>
+#else
+#include <contrib/tools/python/src/Include/modsupport.h>
+#endif
diff --git a/contrib/libs/python/Include/moduleobject.h b/contrib/libs/python/Include/moduleobject.h
new file mode 100644
index 0000000000..9f9e43feb0
--- /dev/null
+++ b/contrib/libs/python/Include/moduleobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/moduleobject.h>
+#else
+#include <contrib/tools/python/src/Include/moduleobject.h>
+#endif
diff --git a/contrib/libs/python/Include/node.h b/contrib/libs/python/Include/node.h
new file mode 100644
index 0000000000..55918431b5
--- /dev/null
+++ b/contrib/libs/python/Include/node.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <node.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/node.h>
+#endif
diff --git a/contrib/libs/python/Include/object.h b/contrib/libs/python/Include/object.h
new file mode 100644
index 0000000000..96b108b51d
--- /dev/null
+++ b/contrib/libs/python/Include/object.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/object.h>
+#else
+#include <contrib/tools/python/src/Include/object.h>
+#endif
diff --git a/contrib/libs/python/Include/objimpl.h b/contrib/libs/python/Include/objimpl.h
new file mode 100644
index 0000000000..92ec418e91
--- /dev/null
+++ b/contrib/libs/python/Include/objimpl.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/objimpl.h>
+#else
+#include <contrib/tools/python/src/Include/objimpl.h>
+#endif
diff --git a/contrib/libs/python/Include/opcode.h b/contrib/libs/python/Include/opcode.h
new file mode 100644
index 0000000000..b4277121ca
--- /dev/null
+++ b/contrib/libs/python/Include/opcode.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/opcode.h>
+#else
+#include <contrib/tools/python/src/Include/opcode.h>
+#endif
diff --git a/contrib/libs/python/Include/osdefs.h b/contrib/libs/python/Include/osdefs.h
new file mode 100644
index 0000000000..bdab65bbfb
--- /dev/null
+++ b/contrib/libs/python/Include/osdefs.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/osdefs.h>
+#else
+#include <contrib/tools/python/src/Include/osdefs.h>
+#endif
diff --git a/contrib/libs/python/Include/osmodule.h b/contrib/libs/python/Include/osmodule.h
new file mode 100644
index 0000000000..5780a76562
--- /dev/null
+++ b/contrib/libs/python/Include/osmodule.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/osmodule.h>
+#else
+#error "No <osmodule.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/parsetok.h b/contrib/libs/python/Include/parsetok.h
new file mode 100644
index 0000000000..2fbb0c3928
--- /dev/null
+++ b/contrib/libs/python/Include/parsetok.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <parsetok.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/parsetok.h>
+#endif
diff --git a/contrib/libs/python/Include/patchlevel.h b/contrib/libs/python/Include/patchlevel.h
new file mode 100644
index 0000000000..01b933a9f3
--- /dev/null
+++ b/contrib/libs/python/Include/patchlevel.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/patchlevel.h>
+#else
+#include <contrib/tools/python/src/Include/patchlevel.h>
+#endif
diff --git a/contrib/libs/python/Include/pgen.h b/contrib/libs/python/Include/pgen.h
new file mode 100644
index 0000000000..b4a3a7dc8d
--- /dev/null
+++ b/contrib/libs/python/Include/pgen.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <pgen.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/pgen.h>
+#endif
diff --git a/contrib/libs/python/Include/pgenheaders.h b/contrib/libs/python/Include/pgenheaders.h
new file mode 100644
index 0000000000..1f859aebad
--- /dev/null
+++ b/contrib/libs/python/Include/pgenheaders.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <pgenheaders.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/pgenheaders.h>
+#endif
diff --git a/contrib/libs/python/Include/py_curses.h b/contrib/libs/python/Include/py_curses.h
new file mode 100644
index 0000000000..d48516db5b
--- /dev/null
+++ b/contrib/libs/python/Include/py_curses.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/py_curses.h>
+#else
+#include <contrib/tools/python/src/Include/py_curses.h>
+#endif
diff --git a/contrib/libs/python/Include/pyarena.h b/contrib/libs/python/Include/pyarena.h
new file mode 100644
index 0000000000..6466c2f269
--- /dev/null
+++ b/contrib/libs/python/Include/pyarena.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <pyarena.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/pyarena.h>
+#endif
diff --git a/contrib/libs/python/Include/pybuffer.h b/contrib/libs/python/Include/pybuffer.h
new file mode 100644
index 0000000000..ae051a6a2f
--- /dev/null
+++ b/contrib/libs/python/Include/pybuffer.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/pybuffer.h>
+#else
+#error "No <pybuffer.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/pycapsule.h b/contrib/libs/python/Include/pycapsule.h
new file mode 100644
index 0000000000..d511b88008
--- /dev/null
+++ b/contrib/libs/python/Include/pycapsule.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/pycapsule.h>
+#else
+#include <contrib/tools/python/src/Include/pycapsule.h>
+#endif
diff --git a/contrib/libs/python/Include/pyctype.h b/contrib/libs/python/Include/pyctype.h
new file mode 100644
index 0000000000..ec116469ab
--- /dev/null
+++ b/contrib/libs/python/Include/pyctype.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <pyctype.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/pyctype.h>
+#endif
diff --git a/contrib/libs/python/Include/pydebug.h b/contrib/libs/python/Include/pydebug.h
new file mode 100644
index 0000000000..c20724196b
--- /dev/null
+++ b/contrib/libs/python/Include/pydebug.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <pydebug.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/pydebug.h>
+#endif
diff --git a/contrib/libs/python/Include/pydtrace.h b/contrib/libs/python/Include/pydtrace.h
new file mode 100644
index 0000000000..3d4c4ab77d
--- /dev/null
+++ b/contrib/libs/python/Include/pydtrace.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/pydtrace.h>
+#else
+#error "No <pydtrace.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/pyexpat.h b/contrib/libs/python/Include/pyexpat.h
new file mode 100644
index 0000000000..25436d6f49
--- /dev/null
+++ b/contrib/libs/python/Include/pyexpat.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/pyexpat.h>
+#else
+#include <contrib/tools/python/src/Include/pyexpat.h>
+#endif
diff --git a/contrib/libs/python/Include/pyfpe.h b/contrib/libs/python/Include/pyfpe.h
new file mode 100644
index 0000000000..bafbbb8cf3
--- /dev/null
+++ b/contrib/libs/python/Include/pyfpe.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <pyfpe.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/pyfpe.h>
+#endif
diff --git a/contrib/libs/python/Include/pyframe.h b/contrib/libs/python/Include/pyframe.h
new file mode 100644
index 0000000000..1bc1b3fafa
--- /dev/null
+++ b/contrib/libs/python/Include/pyframe.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/pyframe.h>
+#else
+#error "No <pyframe.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/pygetopt.h b/contrib/libs/python/Include/pygetopt.h
new file mode 100644
index 0000000000..3e591b03ce
--- /dev/null
+++ b/contrib/libs/python/Include/pygetopt.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <pygetopt.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/pygetopt.h>
+#endif
diff --git a/contrib/libs/python/Include/pyhash.h b/contrib/libs/python/Include/pyhash.h
new file mode 100644
index 0000000000..bf9b47a165
--- /dev/null
+++ b/contrib/libs/python/Include/pyhash.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/pyhash.h>
+#else
+#error "No <pyhash.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/pylifecycle.h b/contrib/libs/python/Include/pylifecycle.h
new file mode 100644
index 0000000000..89a25841d0
--- /dev/null
+++ b/contrib/libs/python/Include/pylifecycle.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/pylifecycle.h>
+#else
+#error "No <pylifecycle.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/pymacconfig.h b/contrib/libs/python/Include/pymacconfig.h
new file mode 100644
index 0000000000..bafd5b822f
--- /dev/null
+++ b/contrib/libs/python/Include/pymacconfig.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/pymacconfig.h>
+#else
+#include <contrib/tools/python/src/Include/pymacconfig.h>
+#endif
diff --git a/contrib/libs/python/Include/pymacro.h b/contrib/libs/python/Include/pymacro.h
new file mode 100644
index 0000000000..b4f8c6880a
--- /dev/null
+++ b/contrib/libs/python/Include/pymacro.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/pymacro.h>
+#else
+#error "No <pymacro.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/pymactoolbox.h b/contrib/libs/python/Include/pymactoolbox.h
new file mode 100644
index 0000000000..320a4920a4
--- /dev/null
+++ b/contrib/libs/python/Include/pymactoolbox.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <pymactoolbox.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/pymactoolbox.h>
+#endif
diff --git a/contrib/libs/python/Include/pymath.h b/contrib/libs/python/Include/pymath.h
new file mode 100644
index 0000000000..29c6dc0d44
--- /dev/null
+++ b/contrib/libs/python/Include/pymath.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/pymath.h>
+#else
+#include <contrib/tools/python/src/Include/pymath.h>
+#endif
diff --git a/contrib/libs/python/Include/pyport.h b/contrib/libs/python/Include/pyport.h
new file mode 100644
index 0000000000..bd9f73433a
--- /dev/null
+++ b/contrib/libs/python/Include/pyport.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/pyport.h>
+#else
+#include <contrib/tools/python/src/Include/pyport.h>
+#endif
diff --git a/contrib/libs/python/Include/pystats.h b/contrib/libs/python/Include/pystats.h
new file mode 100644
index 0000000000..ce625e94e4
--- /dev/null
+++ b/contrib/libs/python/Include/pystats.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/pystats.h>
+#else
+#error "No <pystats.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/pystrcmp.h b/contrib/libs/python/Include/pystrcmp.h
new file mode 100644
index 0000000000..0353b126fb
--- /dev/null
+++ b/contrib/libs/python/Include/pystrcmp.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/pystrcmp.h>
+#else
+#include <contrib/tools/python/src/Include/pystrcmp.h>
+#endif
diff --git a/contrib/libs/python/Include/pystrtod.h b/contrib/libs/python/Include/pystrtod.h
new file mode 100644
index 0000000000..41a850e9e6
--- /dev/null
+++ b/contrib/libs/python/Include/pystrtod.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/pystrtod.h>
+#else
+#include <contrib/tools/python/src/Include/pystrtod.h>
+#endif
diff --git a/contrib/libs/python/Include/pythonrun.h b/contrib/libs/python/Include/pythonrun.h
new file mode 100644
index 0000000000..ed72c99513
--- /dev/null
+++ b/contrib/libs/python/Include/pythonrun.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/pythonrun.h>
+#else
+#include <contrib/tools/python/src/Include/pythonrun.h>
+#endif
diff --git a/contrib/libs/python/Include/pytypedefs.h b/contrib/libs/python/Include/pytypedefs.h
new file mode 100644
index 0000000000..ee86a27466
--- /dev/null
+++ b/contrib/libs/python/Include/pytypedefs.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/pytypedefs.h>
+#else
+#error "No <pytypedefs.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/rangeobject.h b/contrib/libs/python/Include/rangeobject.h
new file mode 100644
index 0000000000..d8457a272e
--- /dev/null
+++ b/contrib/libs/python/Include/rangeobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/rangeobject.h>
+#else
+#include <contrib/tools/python/src/Include/rangeobject.h>
+#endif
diff --git a/contrib/libs/python/Include/setobject.h b/contrib/libs/python/Include/setobject.h
new file mode 100644
index 0000000000..2ad293e49e
--- /dev/null
+++ b/contrib/libs/python/Include/setobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/setobject.h>
+#else
+#include <contrib/tools/python/src/Include/setobject.h>
+#endif
diff --git a/contrib/libs/python/Include/sliceobject.h b/contrib/libs/python/Include/sliceobject.h
new file mode 100644
index 0000000000..ce35f69ea5
--- /dev/null
+++ b/contrib/libs/python/Include/sliceobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/sliceobject.h>
+#else
+#include <contrib/tools/python/src/Include/sliceobject.h>
+#endif
diff --git a/contrib/libs/python/Include/stringobject.h b/contrib/libs/python/Include/stringobject.h
new file mode 100644
index 0000000000..374c66667b
--- /dev/null
+++ b/contrib/libs/python/Include/stringobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <stringobject.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/stringobject.h>
+#endif
diff --git a/contrib/libs/python/Include/symtable.h b/contrib/libs/python/Include/symtable.h
new file mode 100644
index 0000000000..fae7e1ddc4
--- /dev/null
+++ b/contrib/libs/python/Include/symtable.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <symtable.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/symtable.h>
+#endif
diff --git a/contrib/libs/python/Include/sysmodule.h b/contrib/libs/python/Include/sysmodule.h
new file mode 100644
index 0000000000..cff0f9620a
--- /dev/null
+++ b/contrib/libs/python/Include/sysmodule.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/sysmodule.h>
+#else
+#include <contrib/tools/python/src/Include/sysmodule.h>
+#endif
diff --git a/contrib/libs/python/Include/timefuncs.h b/contrib/libs/python/Include/timefuncs.h
new file mode 100644
index 0000000000..409ee6df19
--- /dev/null
+++ b/contrib/libs/python/Include/timefuncs.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <timefuncs.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/timefuncs.h>
+#endif
diff --git a/contrib/libs/python/Include/token.h b/contrib/libs/python/Include/token.h
new file mode 100644
index 0000000000..a49c9f8b94
--- /dev/null
+++ b/contrib/libs/python/Include/token.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <token.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/token.h>
+#endif
diff --git a/contrib/libs/python/Include/tracemalloc.h b/contrib/libs/python/Include/tracemalloc.h
new file mode 100644
index 0000000000..63dd1467bf
--- /dev/null
+++ b/contrib/libs/python/Include/tracemalloc.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/tracemalloc.h>
+#else
+#error "No <tracemalloc.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/tupleobject.h b/contrib/libs/python/Include/tupleobject.h
new file mode 100644
index 0000000000..24259f2794
--- /dev/null
+++ b/contrib/libs/python/Include/tupleobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/tupleobject.h>
+#else
+#include <contrib/tools/python/src/Include/tupleobject.h>
+#endif
diff --git a/contrib/libs/python/Include/typeslots.h b/contrib/libs/python/Include/typeslots.h
new file mode 100644
index 0000000000..93fa302db1
--- /dev/null
+++ b/contrib/libs/python/Include/typeslots.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/typeslots.h>
+#else
+#error "No <typeslots.h> in Python2"
+#endif
diff --git a/contrib/libs/python/Include/ucnhash.h b/contrib/libs/python/Include/ucnhash.h
new file mode 100644
index 0000000000..ca9760af1f
--- /dev/null
+++ b/contrib/libs/python/Include/ucnhash.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#error "No <ucnhash.h> in Python3"
+#else
+#include <contrib/tools/python/src/Include/ucnhash.h>
+#endif
diff --git a/contrib/libs/python/Include/warnings.h b/contrib/libs/python/Include/warnings.h
new file mode 100644
index 0000000000..25f9e81546
--- /dev/null
+++ b/contrib/libs/python/Include/warnings.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/warnings.h>
+#else
+#include <contrib/tools/python/src/Include/warnings.h>
+#endif
diff --git a/contrib/libs/python/Include/weakrefobject.h b/contrib/libs/python/Include/weakrefobject.h
new file mode 100644
index 0000000000..9891d5c11f
--- /dev/null
+++ b/contrib/libs/python/Include/weakrefobject.h
@@ -0,0 +1,7 @@
+#pragma once
+
+#ifdef USE_PYTHON3
+#include <contrib/tools/python3/Include/weakrefobject.h>
+#else
+#include <contrib/tools/python/src/Include/weakrefobject.h>
+#endif
diff --git a/contrib/libs/python/gen_includes.py b/contrib/libs/python/gen_includes.py
new file mode 100755
index 0000000000..1a288b8ec3
--- /dev/null
+++ b/contrib/libs/python/gen_includes.py
@@ -0,0 +1,67 @@
+#!/usr/bin/env python3
+
+import sys
+import os
+import re
+import errno
+from os import listdir
+from os.path import dirname, relpath, join
+
+
+def ensure_dir_exists(path):
+ try:
+ os.makedirs(path)
+ except OSError as e:
+ if e.errno == errno.EEXIST and os.path.isdir(path):
+ pass
+ else:
+ raise
+
+
+def make_dir(directory):
+ if not os.path.exists(directory):
+ os.makedirs(directory)
+
+
+def files(directory):
+ for dirpath, dirnames, filenames in os.walk(directory):
+ for name in filenames:
+ yield relpath(join(dirpath, name), directory)
+
+
+def headers_set(directory):
+ return {
+ f for f in files(directory)
+ if f.endswith('.h') and (not f.startswith('internal/') or f.startswith('internal/pycore_frame.h')) and not re.match(r'^pyconfig[.-].+\.h$', f)
+ }
+
+
+if __name__ == "__main__":
+
+ python2_path = sys.argv[1]
+ python3_path = sys.argv[2]
+ output_path = sys.argv[3]
+
+ ensure_dir_exists(join('.', python2_path))
+ ensure_dir_exists(join('.', python3_path))
+
+ only_headers2 = headers_set(python2_path)
+ only_headers3 = headers_set(python3_path)
+ all_headers = only_headers2 | only_headers3
+
+ for header in all_headers:
+ path = join(output_path, header)
+ make_dir(dirname(path))
+ f = open(path, 'w')
+ f.write('#pragma once\n\n')
+ f.write('#ifdef USE_PYTHON3\n')
+ if (header in only_headers3):
+ f.write('#include <' + join(python3_path, header) + '>\n')
+ else:
+ f.write('#error "No <' + header + '> in Python3"\n')
+ f.write('#else\n')
+ if (header in only_headers2):
+ f.write('#include <' + join(python2_path, header) + '>\n')
+ else:
+ f.write('#error "No <' + header + '> in Python2"\n')
+ f.write('#endif\n')
diff --git a/contrib/libs/python/ut/lib/test.cpp b/contrib/libs/python/ut/lib/test.cpp
new file mode 100644
index 0000000000..e3aabc8889
--- /dev/null
+++ b/contrib/libs/python/ut/lib/test.cpp
@@ -0,0 +1,21 @@
+#include "test.h"
+
+#include <Python.h>
+#include <library/cpp/testing/unittest/registar.h>
+
+TTestPyInvoker::TTestPyInvoker() {}
+
+const char* TTestPyInvoker::GetVersion() {
+ Py_Initialize();
+
+ auto* module = PyImport_ImportModule("sys");
+ UNIT_ASSERT(module != nullptr);
+
+ auto* versionObj = PyObject_GetAttrString(module, "version");
+ if (versionObj == nullptr) {
+ Py_DECREF(module);
+ UNIT_ASSERT(versionObj != nullptr);
+ }
+
+ return Py_GetVersion();
+}
diff --git a/contrib/libs/python/ut/lib/test.h b/contrib/libs/python/ut/lib/test.h
new file mode 100644
index 0000000000..1bf824ebea
--- /dev/null
+++ b/contrib/libs/python/ut/lib/test.h
@@ -0,0 +1,7 @@
+#pragma once
+
+class TTestPyInvoker {
+public:
+ TTestPyInvoker();
+ const char* GetVersion();
+};
diff --git a/contrib/libs/python/ut/lib/ya.make b/contrib/libs/python/ut/lib/ya.make
new file mode 100644
index 0000000000..616d23b2cc
--- /dev/null
+++ b/contrib/libs/python/ut/lib/ya.make
@@ -0,0 +1,19 @@
+SUBSCRIBER(spreis)
+
+PY23_LIBRARY()
+
+WITHOUT_LICENSE_TEXTS()
+
+VERSION(Service-proxy-version)
+
+LICENSE(YandexOpen)
+
+PEERDIR(
+ library/cpp/testing/unittest
+)
+
+SRCS(
+ test.cpp
+)
+
+END()
diff --git a/contrib/libs/python/ut/py2/use.cpp b/contrib/libs/python/ut/py2/use.cpp
new file mode 100644
index 0000000000..a4a2c8d9bb
--- /dev/null
+++ b/contrib/libs/python/ut/py2/use.cpp
@@ -0,0 +1,10 @@
+#include <contrib/libs/python/ut/lib/test.h>
+#include <library/cpp/testing/unittest/registar.h>
+
+Y_UNIT_TEST_SUITE(TestPy3Binding) {
+ Y_UNIT_TEST(version) {
+ TTestPyInvoker invoker;
+ UNIT_ASSERT_EQUAL(invoker.GetVersion()[0], '2');
+ }
+}
+
diff --git a/contrib/libs/python/ut/py2/ya.make b/contrib/libs/python/ut/py2/ya.make
new file mode 100644
index 0000000000..4b6098561f
--- /dev/null
+++ b/contrib/libs/python/ut/py2/ya.make
@@ -0,0 +1,9 @@
+SUBSCRIBER(spreis)
+
+UNITTEST()
+SRCS(use.cpp)
+
+PEERDIR(
+ contrib/libs/python/ut/lib
+)
+END()
diff --git a/contrib/libs/python/ut/py3/use.cpp b/contrib/libs/python/ut/py3/use.cpp
new file mode 100644
index 0000000000..8a2531bcc1
--- /dev/null
+++ b/contrib/libs/python/ut/py3/use.cpp
@@ -0,0 +1,10 @@
+#include <contrib/libs/python/ut/lib/test.h>
+#include <library/cpp/testing/unittest/registar.h>
+
+Y_UNIT_TEST_SUITE(TestPy3Binding) {
+ Y_UNIT_TEST(version) {
+ TTestPyInvoker invoker;
+ UNIT_ASSERT_EQUAL(invoker.GetVersion()[0], '3');
+ }
+}
+
diff --git a/contrib/libs/python/ut/py3/ya.make b/contrib/libs/python/ut/py3/ya.make
new file mode 100644
index 0000000000..5e6f0472f9
--- /dev/null
+++ b/contrib/libs/python/ut/py3/ya.make
@@ -0,0 +1,10 @@
+SUBSCRIBER(spreis)
+
+UNITTEST()
+USE_PYTHON3()
+SRCS(use.cpp)
+
+PEERDIR(
+ contrib/libs/python/ut/lib
+)
+END()
diff --git a/contrib/libs/python/ut/ya.make b/contrib/libs/python/ut/ya.make
new file mode 100644
index 0000000000..cb3cca0818
--- /dev/null
+++ b/contrib/libs/python/ut/ya.make
@@ -0,0 +1,7 @@
+SUBSCRIBER(spreis)
+
+RECURSE(
+ lib
+ py2
+ py3
+) \ No newline at end of file