diff options
author | snermolaev <snermolaev@yandex-team.com> | 2023-09-22 06:39:56 +0300 |
---|---|---|
committer | snermolaev <snermolaev@yandex-team.com> | 2023-09-22 07:03:21 +0300 |
commit | 8c69e0ac07fd349995813680d14c5e515f44bece (patch) | |
tree | 3d8c291269055d15bed5525a724878142cf093db | |
parent | 2848d0b609b460524bfefbdad19508dc120de001 (diff) | |
download | ydb-8c69e0ac07fd349995813680d14c5e515f44bece.tar.gz |
move perl settings to custom point of internal ymake configuration
-rwxr-xr-x | build/ymake_conf.py | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/build/ymake_conf.py b/build/ymake_conf.py index 3d1f05e0744..fede0d53ef2 100755 --- a/build/ymake_conf.py +++ b/build/ymake_conf.py @@ -688,10 +688,6 @@ class Build(object): ragel.configure_toolchain(self, compiler) ragel.print_variables() - perl = Perl() - perl.configure_local() - perl.print_variables('LOCAL_') - swiftc = SwiftCompiler(self) swiftc.configure() swiftc.print_compiler() @@ -2217,52 +2213,6 @@ class Python(object): variables.emit() -class Perl(object): - # Parse (key, value) from "version='5.26.0';" lines - PERL_CONFIG_RE = re.compile(r"^(?P<key>\w+)='(?P<value>.*)';$", re.MULTILINE) - - def __init__(self): - self.perl = None - self.version = None - self.privlib = None - self.archlib = None - - def configure_local(self, perl=None): - self.perl = perl or preset('PERL') or which('perl') - if self.perl is None: - return - - # noinspection PyTypeChecker - config = dict(self._iter_config(['version', 'privlibexp', 'archlibexp'])) - self.version = config.get('version') - self.privlib = config.get('privlibexp') - self.archlib = config.get('archlibexp') - - def print_variables(self, prefix=''): - variables = Variables({ - prefix + 'PERL': self.perl, - prefix + 'PERL_VERSION': self.version, - prefix + 'PERL_PRIVLIB': self.privlib, - prefix + 'PERL_ARCHLIB': self.archlib, - }) - - variables.reset_if_any(reset_value='PERL-NOT-FOUND') - variables.emit(with_ignore_comment=variables.keys()) - - def _iter_config(self, config_keys): - # Run perl -V:version -V:etc... - perl_config = [self.perl] + ['-V:{}'.format(key) for key in config_keys] - config = six.ensure_str(get_stdout(perl_config) or '') - - start = 0 - while True: - match = Perl.PERL_CONFIG_RE.search(config, start) - if match is None: - break - yield match.group('key', 'value') - start = match.end() - - class Setting(object): def __init__(self, key, auto=None, convert=None, rewrite=False): self.key = key |