summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthegeorg <[email protected]>2025-03-11 20:02:44 +0300
committerthegeorg <[email protected]>2025-03-11 20:25:35 +0300
commit23da12b948bb8eddf000625913119101f91ab1ea (patch)
tree20eb7d9c08a70e9c9275332b8afe0582a5c076af
parent1016134d2a4483647a89d0c50e2d55d712955de3 (diff)
Merge win_unicode_console symbols into library/python/symbols/python
This continues the work started in rXXXXXX. commit_hash:8dedee6f36d2b5708f97d6b97bc8bc80ab55a10b
-rw-r--r--contrib/deprecated/python/win-unicode-console/.yandex_meta/yamaker.yaml2
-rw-r--r--contrib/deprecated/python/win-unicode-console/ya.make4
-rw-r--r--library/python/symbols/python/syms.cpp25
-rw-r--r--library/python/symbols/python/ya.make3
-rw-r--r--library/python/symbols/win_unicode_console/syms.cpp15
-rw-r--r--library/python/symbols/win_unicode_console/ya.make11
6 files changed, 9 insertions, 51 deletions
diff --git a/contrib/deprecated/python/win-unicode-console/.yandex_meta/yamaker.yaml b/contrib/deprecated/python/win-unicode-console/.yandex_meta/yamaker.yaml
index 5398d85094d..15f6952f359 100644
--- a/contrib/deprecated/python/win-unicode-console/.yandex_meta/yamaker.yaml
+++ b/contrib/deprecated/python/win-unicode-console/.yandex_meta/yamaker.yaml
@@ -1,5 +1,3 @@
-requirements:
- - library/python/symbols/win_unicode_console
exclude:
- run.py
dos_to_unix:
diff --git a/contrib/deprecated/python/win-unicode-console/ya.make b/contrib/deprecated/python/win-unicode-console/ya.make
index b56f61a3782..dbde10b4fc0 100644
--- a/contrib/deprecated/python/win-unicode-console/ya.make
+++ b/contrib/deprecated/python/win-unicode-console/ya.make
@@ -6,10 +6,6 @@ VERSION(0.5)
LICENSE(MIT)
-PEERDIR(
- library/python/symbols/win_unicode_console
-)
-
NO_LINT()
NO_CHECK_IMPORTS(
diff --git a/library/python/symbols/python/syms.cpp b/library/python/symbols/python/syms.cpp
index aa9c3ceeb00..d7958e61357 100644
--- a/library/python/symbols/python/syms.cpp
+++ b/library/python/symbols/python/syms.cpp
@@ -1,20 +1,4 @@
-#define SYM(SYM_NAME) extern "C" void SYM_NAME();
-SYM(PyBuffer_Release)
-SYM(PyCapsule_GetContext)
-SYM(PyCapsule_GetDestructor)
-SYM(PyCapsule_GetName)
-SYM(PyCapsule_GetPointer)
-SYM(PyCapsule_IsValid)
-SYM(PyCapsule_New)
-SYM(PyCapsule_SetContext)
-SYM(PyCapsule_SetDestructor)
-SYM(PyCapsule_SetName)
-SYM(PyCapsule_SetPointer)
-SYM(PyCell_New)
-SYM(PyObject_GetBuffer)
-SYM(Py_DecRef)
-SYM(Py_IncRef)
-#undef SYM
+#include <Python.h>
#include <library/python/symbols/registry/syms.h>
@@ -31,7 +15,14 @@ SYM(PyCapsule_SetDestructor)
SYM(PyCapsule_SetName)
SYM(PyCapsule_SetPointer)
SYM(PyCell_New)
+SYM(PyMem_Malloc)
SYM(PyObject_GetBuffer)
+SYM(PyOS_Readline)
SYM(Py_DecRef)
SYM(Py_IncRef)
+
+#if PY_VERSION_HEX < 0x3000000
+SYM(PyFile_SetEncoding)
+SYM(PyFile_AsFile)
+#endif
END_SYMS()
diff --git a/library/python/symbols/python/ya.make b/library/python/symbols/python/ya.make
index 20028a44eff..d6682ba3f71 100644
--- a/library/python/symbols/python/ya.make
+++ b/library/python/symbols/python/ya.make
@@ -1,5 +1,4 @@
-LIBRARY()
-
+PY23_NATIVE_LIBRARY()
PEERDIR(
library/python/symbols/registry
diff --git a/library/python/symbols/win_unicode_console/syms.cpp b/library/python/symbols/win_unicode_console/syms.cpp
deleted file mode 100644
index a26f068518a..00000000000
--- a/library/python/symbols/win_unicode_console/syms.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-#define SYM(SYM_NAME) extern "C" void SYM_NAME();
-SYM(PyFile_SetEncoding)
-SYM(PyFile_AsFile)
-SYM(PyMem_Malloc)
-SYM(PyOS_Readline)
-#undef SYM
-
-#include <library/python/symbols/registry/syms.h>
-
-BEGIN_SYMS("python")
-SYM(PyFile_SetEncoding)
-SYM(PyFile_AsFile)
-SYM(PyMem_Malloc)
-SYM(PyOS_Readline)
-END_SYMS()
diff --git a/library/python/symbols/win_unicode_console/ya.make b/library/python/symbols/win_unicode_console/ya.make
deleted file mode 100644
index f1fe4ad2ced..00000000000
--- a/library/python/symbols/win_unicode_console/ya.make
+++ /dev/null
@@ -1,11 +0,0 @@
-LIBRARY()
-
-PEERDIR(
- library/python/symbols/registry
-)
-
-SRCS(
- GLOBAL syms.cpp
-)
-
-END()