files.new_contents: # Copyright 2012-2016 The Meson development team
  
  # Licensed under the Apache License, Version 2.0 (the "License");
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  
  #     http://www.apache.org/licenses/LICENSE-2.0
  
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
  
  from collections import OrderedDict
  from functools import lru_cache
  import enum
  import json
  import os
  import pickle
  import re
  import shlex
  import subprocess
  import textwrap
  import typing as T
  
  from .. import build
  from .. import dependencies
  from .. import mesonlib
  from .. import mlog
  from ..compilers import CompilerArgs, VisualStudioLikeCompiler
  from ..mesonlib import (
      File, MachineChoice, MesonException, OrderedSet, OptionOverrideProxy,
      classify_unity_sources, unholder
  )
  
  if T.TYPE_CHECKING:
      from ..interpreter import Interpreter
  
  
  class TestProtocol(enum.Enum):
  
      EXITCODE = 0
      TAP = 1
  
      @classmethod
      def from_str(cls, string: str) -> 'TestProtocol':
          if string == 'exitcode':
              return cls.EXITCODE
          elif string == 'tap':
              return cls.TAP
          raise MesonException('unknown test format {}'.format(string))
  
      def __str__(self) -> str:
          if self is self.EXITCODE:
              return 'exitcode'
          return 'tap'
  
  
  class CleanTrees:
      '''
      Directories outputted by custom targets that have to be manually cleaned
      because on Linux `ninja clean` only deletes empty directories.
      '''
      def __init__(self, build_dir, trees):
          self.build_dir = build_dir
          self.trees = trees
  
  class InstallData:
      def __init__(self, source_dir, build_dir, prefix, strip_bin,
                   install_umask, mesonintrospect):
          self.source_dir = source_dir
          self.build_dir = build_dir
          self.p
  
  [... the rest is omitted ...]
files.new_path: mesonbuild/backend/backends.py
files.old_contents: # Copyright 2012-2016 The Meson development team
  
  # Licensed under the Apache License, Version 2.0 (the "License");
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  
  #     http://www.apache.org/licenses/LICENSE-2.0
  
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
  
  from collections import OrderedDict
  from functools import lru_cache
  import json
  import os
  import pickle
  import re
  import shlex
  import subprocess
  import textwrap
  import typing as T
  
  from .. import build
  from .. import dependencies
  from .. import mesonlib
  from .. import mlog
  from ..compilers import CompilerArgs, VisualStudioLikeCompiler
  from ..interpreter import Interpreter
  from ..mesonlib import (
      File, MachineChoice, MesonException, OrderedSet, OptionOverrideProxy,
      classify_unity_sources, unholder
  )
  
  
  class CleanTrees:
      '''
      Directories outputted by custom targets that have to be manually cleaned
      because on Linux `ninja clean` only deletes empty directories.
      '''
      def __init__(self, build_dir, trees):
          self.build_dir = build_dir
          self.trees = trees
  
  class InstallData:
      def __init__(self, source_dir, build_dir, prefix, strip_bin,
                   install_umask, mesonintrospect):
          self.source_dir = source_dir
          self.build_dir = build_dir
          self.prefix = prefix
          self.strip_bin = strip_bin
          self.install_umask = install_umask
          self.targets = []
          self.headers = []
          self.man = []
          self.data = []
          self.po_package_name = ''
          self.po = []
          self.install_scripts = []
          self.install_subdirs = []
          self.mesonintrospect = mesonintrospect
  
  class TargetInstallData:
      def __init__(self, fname, outdir, aliases, strip, install_name_mappings, install_rpath, install
  
  [... the rest is omitted ...]
files.old_path: mesonbuild/backend/backends.py
files.new_contents: # Copyright 2012-2019 The Meson development team
  # Licensed under the Apache License, Version 2.0 (the "License");
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  
  #     http://www.apache.org/licenses/LICENSE-2.0
  
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
  
  from . import mparser
  from . import environment
  from . import coredata
  from . import dependencies
  from . import mlog
  from . import build
  from . import optinterpreter
  from . import compilers
  from .wrap import wrap, WrapMode
  from . import mesonlib
  from .mesonlib import FileMode, MachineChoice, Popen_safe, listify, extract_as_list, has_path_sep, unholder
  from .dependencies import ExternalProgram
  from .dependencies import InternalDependency, Dependency, NotFoundDependency, DependencyException
  from .depfile import DepFile
  from .interpreterbase import InterpreterBase
  from .interpreterbase import check_stringlist, flatten, noPosargs, noKwargs, stringArgs, permittedKwargs, noArgsFlattening
  from .interpreterbase import InterpreterException, InvalidArguments, InvalidCode, SubdirDoneRequest
  from .interpreterbase import InterpreterObject, MutableInterpreterObject, Disabler, disablerIfNotFound
  from .interpreterbase import FeatureNew, FeatureDeprecated, FeatureNewKwargs
  from .interpreterbase import ObjectHolder
  from .modules import ModuleReturnValue
  from .cmake import CMakeInterpreter
  from .backend.backends import TestProtocol
  
  from pathlib import Path, PurePath
  import os
  import shutil
  import uuid
  import re
  import shlex
  import subprocess
  import collections
  import functools
  import typing as T
  
  import importlib
  
  permitted_method_kwargs = {
      'partial_dependency': {'compile_args', 'link_args', 'links', 'includes',
                             'sources'},
  }
  
  def stringifyUserArguments(args):
      if isinstance(args, list):
          return '[
  
  [... the rest is omitted ...]
files.new_path: mesonbuild/interpreter.py
files.old_contents: # Copyright 2012-2019 The Meson development team
  # Licensed under the Apache License, Version 2.0 (the "License");
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  
  #     http://www.apache.org/licenses/LICENSE-2.0
  
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
  
  from . import mparser
  from . import environment
  from . import coredata
  from . import dependencies
  from . import mlog
  from . import build
  from . import optinterpreter
  from . import compilers
  from .wrap import wrap, WrapMode
  from . import mesonlib
  from .mesonlib import FileMode, MachineChoice, Popen_safe, listify, extract_as_list, has_path_sep, unholder
  from .dependencies import ExternalProgram
  from .dependencies import InternalDependency, Dependency, NotFoundDependency, DependencyException
  from .depfile import DepFile
  from .interpreterbase import InterpreterBase
  from .interpreterbase import check_stringlist, flatten, noPosargs, noKwargs, stringArgs, permittedKwargs, noArgsFlattening
  from .interpreterbase import InterpreterException, InvalidArguments, InvalidCode, SubdirDoneRequest
  from .interpreterbase import InterpreterObject, MutableInterpreterObject, Disabler, disablerIfNotFound
  from .interpreterbase import FeatureNew, FeatureDeprecated, FeatureNewKwargs
  from .interpreterbase import ObjectHolder
  from .modules import ModuleReturnValue
  from .cmake import CMakeInterpreter
  
  from pathlib import Path, PurePath
  import os
  import shutil
  import uuid
  import re
  import shlex
  import subprocess
  import collections
  import functools
  import typing as T
  
  import importlib
  
  permitted_method_kwargs = {
      'partial_dependency': {'compile_args', 'link_args', 'links', 'includes',
                             'sources'},
  }
  
  def stringifyUserArguments(args):
      if isinstance(args, list):
          return '[%s]' % ', '.join([
  
  [... the rest is omitted ...]
files.old_path: mesonbuild/interpreter.py
files.new_contents: # Copyright 2014-2016 The Meson development team
  
  # Licensed under the Apache License, Version 2.0 (the "License");
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  
  #     http://www.apache.org/licenses/LICENSE-2.0
  
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
  
  """This is a helper script for IDE developers. It allows you to
  extract information such as list of targets, files, compiler flags,
  tests and so on. All output is in JSON for simple parsing.
  
  Currently only works for the Ninja backend. Others use generated
  project files and don't need this info."""
  
  import json
  from . import build, coredata as cdata
  from . import mesonlib
  from .ast import IntrospectionInterpreter, build_target_functions, AstConditionLevel, AstIDGenerator, AstIndentationGenerator
  from . import mlog
  from .backend import backends
  from .mparser import BaseNode, FunctionNode, ArrayNode, ArgumentNode, StringNode
  from .interpreter import Interpreter
  from pathlib import PurePath
  import typing as T
  import os
  
  def get_meson_info_file(info_dir: str) -> str:
      return os.path.join(info_dir, 'meson-info.json')
  
  def get_meson_introspection_version() -> str:
      return '1.0.0'
  
  def get_meson_introspection_required_version() -> T.List[str]:
      return ['>=1.0', '<2.0']
  
  class IntroCommand:
      def __init__(self,
                   desc: str,
                   func: T.Optional[T.Callable[[], T.Union[dict, list]]] = None,
                   no_bd: T.Optional[T.Callable[[IntrospectionInterpreter], T.Union[dict, list]]] = None) -> None:
          self.desc = desc + '.'
          self.func = func
          self.no_bd = no_bd
  
  def get_meson_introspection_types(coredata: T.Optional[cdata.CoreData]
  
  [... the rest is omitted ...]
files.new_path: mesonbuild/mintro.py
files.old_contents: # Copyright 2014-2016 The Meson development team
  
  # Licensed under the Apache License, Version 2.0 (the "License");
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  
  #     http://www.apache.org/licenses/LICENSE-2.0
  
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
  
  """This is a helper script for IDE developers. It allows you to
  extract information such as list of targets, files, compiler flags,
  tests and so on. All output is in JSON for simple parsing.
  
  Currently only works for the Ninja backend. Others use generated
  project files and don't need this info."""
  
  import json
  from . import build, coredata as cdata
  from . import mesonlib
  from .ast import IntrospectionInterpreter, build_target_functions, AstConditionLevel, AstIDGenerator, AstIndentationGenerator
  from . import mlog
  from .backend import backends
  from .mparser import BaseNode, FunctionNode, ArrayNode, ArgumentNode, StringNode
  from .interpreter import Interpreter
  from pathlib import PurePath
  import typing as T
  import os
  
  def get_meson_info_file(info_dir: str) -> str:
      return os.path.join(info_dir, 'meson-info.json')
  
  def get_meson_introspection_version() -> str:
      return '1.0.0'
  
  def get_meson_introspection_required_version() -> T.List[str]:
      return ['>=1.0', '<2.0']
  
  class IntroCommand:
      def __init__(self,
                   desc: str,
                   func: T.Optional[T.Callable[[], T.Union[dict, list]]] = None,
                   no_bd: T.Optional[T.Callable[[IntrospectionInterpreter], T.Union[dict, list]]] = None) -> None:
          self.desc = desc + '.'
          self.func = func
          self.no_bd = no_bd
  
  def get_meson_introspection_types(coredata: T.Optional[cdata.CoreData]
  
  [... the rest is omitted ...]
files.old_path: mesonbuild/mintro.py
files.new_contents: # Copyright 2016-2017 The Meson development team
  
  # Licensed under the Apache License, Version 2.0 (the "License");
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  
  #     http://www.apache.org/licenses/LICENSE-2.0
  
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
  
  # A tool to run tests in many different ways.
  
  from pathlib import Path
  from collections import namedtuple
  from copy import deepcopy
  import argparse
  import concurrent.futures as conc
  import datetime
  import enum
  import io
  import json
  import multiprocessing
  import os
  import pickle
  import platform
  import random
  import re
  import signal
  import subprocess
  import sys
  import tempfile
  import textwrap
  import time
  import typing as T
  import xml.etree.ElementTree as et
  
  from . import build
  from . import environment
  from . import mlog
  from .dependencies import ExternalProgram
  from .mesonlib import MesonException, get_wine_shortpath, split_args
  from .backend.backends import TestProtocol
  
  if T.TYPE_CHECKING:
      from .backend.backends import TestSerialisation
  
  # GNU autotools interprets a return code of 77 from tests it executes to
  # mean that the test should be skipped.
  GNU_SKIP_RETURNCODE = 77
  
  # GNU autotools interprets a return code of 99 from tests it executes to
  # mean that the test failed even before testing what it is supposed to test.
  GNU_ERROR_RETURNCODE = 99
  
  def is_windows() -> bool:
      platname = platform.system().lower()
      return platname == 'windows' or 'mingw' in platname
  
  def is_cygwin() -> bool:
      platname = platform.system().lower()
      return 'cygwin' in platname
  
  def determine_worker_count() -> int:
      varname = 'MESON_TESTTHREADS'
      if varname in os.environ:
          try:
              num_workers =
  
  [... the rest is omitted ...]
files.new_path: mesonbuild/mtest.py
files.old_contents: # Copyright 2016-2017 The Meson development team
  
  # Licensed under the Apache License, Version 2.0 (the "License");
  # you may not use this file except in compliance with the License.
  # You may obtain a copy of the License at
  
  #     http://www.apache.org/licenses/LICENSE-2.0
  
  # Unless required by applicable law or agreed to in writing, software
  # distributed under the License is distributed on an "AS IS" BASIS,
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  # See the License for the specific language governing permissions and
  # limitations under the License.
  
  # A tool to run tests in many different ways.
  
  from pathlib import Path
  from collections import namedtuple
  from copy import deepcopy
  import argparse
  import concurrent.futures as conc
  import datetime
  import enum
  import io
  import json
  import multiprocessing
  import os
  import pickle
  import platform
  import random
  import re
  import signal
  import subprocess
  import sys
  import tempfile
  import textwrap
  import time
  import typing as T
  import xml.etree.ElementTree as et
  
  from . import build
  from . import environment
  from . import mlog
  from .dependencies import ExternalProgram
  from .mesonlib import MesonException, get_wine_shortpath, split_args
  
  if T.TYPE_CHECKING:
      from .backend.backends import TestSerialisation
  
  # GNU autotools interprets a return code of 77 from tests it executes to
  # mean that the test should be skipped.
  GNU_SKIP_RETURNCODE = 77
  
  # GNU autotools interprets a return code of 99 from tests it executes to
  # mean that the test failed even before testing what it is supposed to test.
  GNU_ERROR_RETURNCODE = 99
  
  def is_windows() -> bool:
      platname = platform.system().lower()
      return platname == 'windows' or 'mingw' in platname
  
  def is_cygwin() -> bool:
      platname = platform.system().lower()
      return 'cygwin' in platname
  
  def determine_worker_count() -> int:
      varname = 'MESON_TESTTHREADS'
      if varname in os.environ:
          try:
              num_workers = int(os.environ[varname])
         
  
  [... the rest is omitted ...]
files.old_path: mesonbuild/mtest.py