diff options
| author | maxim-yurchuk <[email protected]> | 2024-10-09 12:29:46 +0300 | 
|---|---|---|
| committer | maxim-yurchuk <[email protected]> | 2024-10-09 13:14:22 +0300 | 
| commit | 9731d8a4bb7ee2cc8554eaf133bb85498a4c7d80 (patch) | |
| tree | a8fb3181d5947c0d78cf402aa56e686130179049 /contrib/python/py | |
| parent | a44b779cd359f06c3ebbef4ec98c6b38609d9d85 (diff) | |
publishFullContrib: true for ydb
<HIDDEN_URL>
commit_hash:c82a80ac4594723cebf2c7387dec9c60217f603e
Diffstat (limited to 'contrib/python/py')
| -rw-r--r-- | contrib/python/py/py2/.yandex_meta/yamaker.yaml | 2 | ||||
| -rw-r--r-- | contrib/python/py/py2/patches/01-arcadia.patch | 27 | ||||
| -rw-r--r-- | contrib/python/py/py3/.yandex_meta/yamaker.yaml | 2 | ||||
| -rw-r--r-- | contrib/python/py/py3/patches/01-arcadia.patch | 27 | 
4 files changed, 58 insertions, 0 deletions
| 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: | 
