From 9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80 Mon Sep 17 00:00:00 2001 From: maxim-yurchuk Date: Wed, 9 Oct 2024 12:29:46 +0300 Subject: publishFullContrib: true for ydb commit_hash:c82a80ac4594723cebf2c7387dec9c60217f603e --- contrib/python/py/py2/.yandex_meta/yamaker.yaml | 2 ++ contrib/python/py/py2/patches/01-arcadia.patch | 27 +++++++++++++++++++++++++ contrib/python/py/py3/.yandex_meta/yamaker.yaml | 2 ++ contrib/python/py/py3/patches/01-arcadia.patch | 27 +++++++++++++++++++++++++ 4 files changed, 58 insertions(+) create mode 100644 contrib/python/py/py2/.yandex_meta/yamaker.yaml create mode 100644 contrib/python/py/py2/patches/01-arcadia.patch create mode 100644 contrib/python/py/py3/.yandex_meta/yamaker.yaml create mode 100644 contrib/python/py/py3/patches/01-arcadia.patch (limited to 'contrib/python/py') diff --git a/contrib/python/py/py2/.yandex_meta/yamaker.yaml b/contrib/python/py/py2/.yandex_meta/yamaker.yaml new file mode 100644 index 00000000000..726dcc54346 --- /dev/null +++ b/contrib/python/py/py2/.yandex_meta/yamaker.yaml @@ -0,0 +1,2 @@ +mark_as_sources: + - py/test.py diff --git a/contrib/python/py/py2/patches/01-arcadia.patch b/contrib/python/py/py2/patches/01-arcadia.patch new file mode 100644 index 00000000000..080e4a35f99 --- /dev/null +++ b/contrib/python/py/py2/patches/01-arcadia.patch @@ -0,0 +1,27 @@ +--- contrib/python/py/py2/py/_vendored_packages/iniconfig/__init__.py (working tree) ++++ contrib/python/py/py2/py/_vendored_packages/iniconfig/__init__.py (index) +@@ -1,6 +1,8 @@ + """ brain-dead simple parser for ini-style files. + (C) Ronny Pfannschmidt, Holger Krekel -- MIT licensed + """ ++import io ++ + __all__ = ['IniConfig', 'ParseError'] + + COMMENTCHARS = "#;" +@@ -49,7 +51,14 @@ + def __init__(self, path, data=None): + self.path = str(path) # convenience + if data is None: +- f = open(self.path) ++ if self.path.startswith('pkg:'): ++ import pkgutil ++ ++ _, package, resource = self.path.split(':') ++ content = pkgutil.get_data(package, resource) ++ f = io.StringIO(content.decode('utf-8')) ++ else: ++ f = open(self.path) + try: + tokens = self._parse(iter(f)) + finally: diff --git a/contrib/python/py/py3/.yandex_meta/yamaker.yaml b/contrib/python/py/py3/.yandex_meta/yamaker.yaml new file mode 100644 index 00000000000..726dcc54346 --- /dev/null +++ b/contrib/python/py/py3/.yandex_meta/yamaker.yaml @@ -0,0 +1,2 @@ +mark_as_sources: + - py/test.py diff --git a/contrib/python/py/py3/patches/01-arcadia.patch b/contrib/python/py/py3/patches/01-arcadia.patch new file mode 100644 index 00000000000..12c8e328a1f --- /dev/null +++ b/contrib/python/py/py3/patches/01-arcadia.patch @@ -0,0 +1,27 @@ +--- contrib/python/py/py3/py/_vendored_packages/iniconfig/__init__.py (working tree) ++++ contrib/python/py/py3/py/_vendored_packages/iniconfig/__init__.py (index) +@@ -1,6 +1,8 @@ + """ brain-dead simple parser for ini-style files. + (C) Ronny Pfannschmidt, Holger Krekel -- MIT licensed + """ ++import io ++ + __all__ = ['IniConfig', 'ParseError'] + + COMMENTCHARS = "#;" +@@ -49,7 +51,14 @@ + def __init__(self, path, data=None): + self.path = str(path) # convenience + if data is None: +- f = open(self.path) ++ if self.path.startswith('pkg:'): ++ import pkgutil ++ ++ _, package, resource = self.path.split(':') ++ content = pkgutil.get_data(package, resource) ++ f = io.StringIO(content.decode('utf-8')) ++ else: ++ f = open(self.path) + try: + tokens = self._parse(iter(f)) + finally: -- cgit v1.3