diff options
author | pg <pg@yandex-team.com> | 2025-03-05 11:21:09 +0300 |
---|---|---|
committer | pg <pg@yandex-team.com> | 2025-03-05 11:41:24 +0300 |
commit | 472e032cff4a665bad47e1470a4440682ca1166e (patch) | |
tree | f30a971771707b6a852251155b152bb51c4ebe56 /build/scripts/link_dyn_lib.py | |
parent | 891a7f7da8cf5b6c450793fcee72417cbebf6e36 (diff) | |
download | ydb-472e032cff4a665bad47e1470a4440682ca1166e.tar.gz |
py3 compat
commit_hash:0bfe28c22ee33f4493f9915f1811a20bba2253b0
Diffstat (limited to 'build/scripts/link_dyn_lib.py')
-rw-r--r-- | build/scripts/link_dyn_lib.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/build/scripts/link_dyn_lib.py b/build/scripts/link_dyn_lib.py index 076460c9ed..6ddfbc53a1 100644 --- a/build/scripts/link_dyn_lib.py +++ b/build/scripts/link_dyn_lib.py @@ -1,4 +1,5 @@ from __future__ import print_function + import sys import os import json @@ -6,7 +7,16 @@ import subprocess import tempfile import collections import optparse -import pipes + +try: + import shlex + shlex_join = shlex.join +except AttributeError: + import pipes + + def shlex_join(cmd): + # equivalent to shlex.join() in python 3 + return ' '.join(pipes.quote(part) for part in cmd) # Explicitly enable local imports # Don't forget to add imported scripts to inputs of the calling command! @@ -17,10 +27,6 @@ import link_exe from process_whole_archive_option import ProcessWholeArchiveOption -def shlex_join(cmd): - # equivalent to shlex.join() in python 3 - return ' '.join(pipes.quote(part) for part in cmd) - def parse_export_file(p): with open(p, 'r') as f: |