files.new_contents: # Copyright 2012-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.
  
  import os, pickle, re, shlex, subprocess
  from collections import OrderedDict
  import itertools
  from pathlib import PurePath
  
  from . import backends
  from .. import modules
  from .. import environment, mesonlib
  from .. import build
  from .. import mlog
  from .. import dependencies
  from .. import compilers
  from ..compilers import CompilerArgs
  from ..linkers import ArLinker
  from ..mesonlib import File, MesonException, OrderedSet
  from ..mesonlib import get_compiler_for_source, has_path_sep
  from .backends import CleanTrees, InstallData
  from ..build import InvalidArguments
  
  if mesonlib.is_windows():
      quote_func = lambda s: '"{}"'.format(s)
      execute_wrapper = 'cmd /c'
      rmfile_prefix = 'del /f /s /q {} &&'
  else:
      quote_func = shlex.quote
      execute_wrapper = ''
      rmfile_prefix = 'rm -f {} &&'
  
  def ninja_quote(text, is_build_line=False):
      if is_build_line:
          qcs = ('$', ' ', ':')
      else:
          qcs = ('$', ' ')
      for char in qcs:
         
  
  [... the rest is omitted ...]
files.new_path: mesonbuild/backend/ninjabackend.py
files.old_contents: # Copyright 2012-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.
  
  import os, pickle, re, shlex, subprocess
  from collections import OrderedDict
  import itertools
  from pathlib import PurePath
  
  from . import backends
  from .. import modules
  from .. import environment, mesonlib
  from .. import build
  from .. import mlog
  from .. import dependencies
  from .. import compilers
  from ..compilers import CompilerArgs
  from ..linkers import ArLinker
  from ..mesonlib import File, MesonException, OrderedSet
  from ..mesonlib import get_compiler_for_source
  from .backends import CleanTrees, InstallData
  from ..build import InvalidArguments
  
  if mesonlib.is_windows():
      quote_func = lambda s: '"{}"'.format(s)
      execute_wrapper = 'cmd /c'
      rmfile_prefix = 'del /f /s /q {} &&'
  else:
      quote_func = shlex.quote
      execute_wrapper = ''
      rmfile_prefix = 'rm -f {} &&'
  
  def ninja_quote(text, is_build_line=False):
      if is_build_line:
          qcs = ('$', ' ', ':')
      else:
          qcs = ('$', ' ')
      for char in qcs:
          text = text.replace(char
  
  [... the rest is omitted ...]
files.old_path: mesonbuild/backend/ninjabackend.py
files.new_contents: # Copyright 2012-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.
  
  import copy, os, re
  from collections import OrderedDict
  import itertools, pathlib
  import pickle
  
  from . import environment
  from . import dependencies
  from . import mlog
  from .mesonlib import File, MesonException, listify, extract_as_list
  from .mesonlib import typeslistify, stringlistify, classify_unity_sources
  from .mesonlib import get_filenames_templates_dict, substitute_values
  from .mesonlib import for_windows, for_darwin, for_cygwin, for_android, has_path_sep
  from .compilers import is_object, clike_langs, sort_clike, lang_suffixes
  
  known_basic_kwargs = {'install': True,
                        'c_pch': True,
                        'cpp_pch': True,
                        'c_args': True,
                        'objc_args': True,
                        'objcpp_args': True,
                        'cpp_args': True,
                        'cs_args': True,
                        'vala_args': True,
                        'fortran_args': True,
                        'd_args': True,
                        'd_import_dirs': True,
                        'd_unittest': True,
                        'd_module_versions': True,
                        'java_args': True,
  
  
  [... the rest is omitted ...]
files.new_path: mesonbuild/build.py
files.old_contents: # Copyright 2012-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.
  
  import copy, os, re
  from collections import OrderedDict
  import itertools, pathlib
  import pickle
  
  from . import environment
  from . import dependencies
  from . import mlog
  from .mesonlib import File, MesonException, listify, extract_as_list
  from .mesonlib import typeslistify, stringlistify, classify_unity_sources
  from .mesonlib import get_filenames_templates_dict, substitute_values
  from .mesonlib import for_windows, for_darwin, for_cygwin, for_android
  from .compilers import is_object, clike_langs, sort_clike, lang_suffixes
  
  known_basic_kwargs = {'install': True,
                        'c_pch': True,
                        'cpp_pch': True,
                        'c_args': True,
                        'objc_args': True,
                        'objcpp_args': True,
                        'cpp_args': True,
                        'cs_args': True,
                        'vala_args': True,
                        'fortran_args': True,
                        'd_args': True,
                        'd_import_dirs': True,
                        'd_unittest': True,
                        'd_module_versions': True,
                        'java_args': True,
                        'rust_args':
  
  [... the rest is omitted ...]
files.old_path: mesonbuild/build.py
files.new_contents: # Copyright 2012-2018 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, Popen_safe, listify, extract_as_list, has_path_sep
  from .dependencies import ExternalProgram
  from .dependencies import InternalDependency, Dependency, DependencyException
  from .interpreterbase import InterpreterBase
  from .interpreterbase import check_stringlist, noPosargs, noKwargs, stringArgs, permittedKwargs, permittedMethodKwargs
  from .interpreterbase import InterpreterException, InvalidArguments, InvalidCode
  from .interpreterbase import InterpreterObject, MutableInterpreterObject, Disabler
  from .modules import ModuleReturnValue
  
  import os, sys, shutil, uuid
  import re, shlex
  from collections import namedtuple
  from pathlib import PurePath
  
  import importlib
  
  
  def stringifyUserArguments(args):
      if isinstance(args, list):
          return '[%s]' % ', '.join([stringifyUserArguments(x) for x in args])
      elif isinstance(args
  
  [... the rest is omitted ...]
files.new_path: mesonbuild/interpreter.py
files.old_contents: # Copyright 2012-2018 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, Popen_safe, listify, extract_as_list
  from .dependencies import ExternalProgram
  from .dependencies import InternalDependency, Dependency, DependencyException
  from .interpreterbase import InterpreterBase
  from .interpreterbase import check_stringlist, noPosargs, noKwargs, stringArgs, permittedKwargs, permittedMethodKwargs
  from .interpreterbase import InterpreterException, InvalidArguments, InvalidCode
  from .interpreterbase import InterpreterObject, MutableInterpreterObject, Disabler
  from .modules import ModuleReturnValue
  
  import os, sys, shutil, uuid
  import re, shlex
  from collections import namedtuple
  from pathlib import PurePath
  
  import importlib
  
  
  def stringifyUserArguments(args):
      if isinstance(args, list):
          return '[%s]' % ', '.join([stringifyUserArguments(x) for x in args])
      elif isinstance(args, int):
          return
  
  [... the rest is omitted ...]
files.old_path: mesonbuild/interpreter.py
files.new_contents: # Copyright 2012-2015 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 library of random helper functionality."""
  
  import sys
  import stat
  import time
  import platform, subprocess, operator, os, shutil, re
  import collections
  from mesonbuild import mlog
  
  from glob import glob
  
  def detect_meson_py_location():
      c = sys.argv[0]
      c_dir, c_fname = os.path.split(c)
  
      # get the absolute path to the <mesontool> folder
      m_dir = None
      if os.path.isabs(c):
          # $ /foo/<mesontool>.py <args>
          m_dir = c_dir
      elif c_dir == '':
          # $ <mesontool> <args> (gets run from /usr/bin/<mesontool>)
          in_path_exe = shutil.which(c_fname)
          if in_path_exe:
              if not os.path.isabs(in_path_exe):
                  m_dir = os.getcwd()
                  c_fname = in_path_exe
              else:
                  m_dir, c_fname = os.path.split(in_path_exe)
      else:
          m_dir = os.path.abspath(c_dir)
  
      # find meson in m_dir
      if m_dir is not None:
          for fname in ['
  
  [... the rest is omitted ...]
files.new_path: mesonbuild/mesonlib.py
files.old_contents: # Copyright 2012-2015 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 library of random helper functionality."""
  
  import sys
  import stat
  import time
  import platform, subprocess, operator, os, shutil, re
  import collections
  from mesonbuild import mlog
  
  from glob import glob
  
  def detect_meson_py_location():
      c = sys.argv[0]
      c_dir, c_fname = os.path.split(c)
  
      # get the absolute path to the <mesontool> folder
      m_dir = None
      if os.path.isabs(c):
          # $ /foo/<mesontool>.py <args>
          m_dir = c_dir
      elif c_dir == '':
          # $ <mesontool> <args> (gets run from /usr/bin/<mesontool>)
          in_path_exe = shutil.which(c_fname)
          if in_path_exe:
              if not os.path.isabs(in_path_exe):
                  m_dir = os.getcwd()
                  c_fname = in_path_exe
              else:
                  m_dir, c_fname = os.path.split(in_path_exe)
      else:
          m_dir = os.path.abspath(c_dir)
  
      # find meson in m_dir
      if m_dir is not None:
          for fname in ['
  
  [... the rest is omitted ...]
files.old_path: mesonbuild/mesonlib.py
files.new_contents: # Copyright 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.
  
  import os
  import subprocess
  import shutil
  import argparse
  from .. import mlog
  from ..mesonlib import has_path_sep
  from . import destdir_join
  from .gettext import read_linguas
  
  parser = argparse.ArgumentParser()
  parser.add_argument('command')
  parser.add_argument('--id', dest='project_id')
  parser.add_argument('--subdir', dest='subdir')
  parser.add_argument('--installdir', dest='install_dir')
  parser.add_argument('--sources', dest='sources')
  parser.add_argument('--media', dest='media', default='')
  parser.add_argument('--langs', dest='langs', default='')
  parser.add_argument('--symlinks', type=bool, dest='symlinks', default=False)
  
  def build_pot(srcdir, project_id, sources):
      # Must be relative paths
      sources = [os.path.join('C', source) for source in sources]
      outfile = os.path.join(srcdir, project_id + '.pot')
      subprocess.call(['itstool', '-o', outfile] + sources)
  
  def update_po(srcdir, project_id, langs):
      potfile = os.path.join(srcdir, project_id + '.pot')
  
  
  [... the rest is omitted ...]
files.new_path: mesonbuild/scripts/yelphelper.py
files.old_contents: # Copyright 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.
  
  import os
  import subprocess
  import shutil
  import argparse
  from .. import mlog
  from . import destdir_join
  from .gettext import read_linguas
  
  parser = argparse.ArgumentParser()
  parser.add_argument('command')
  parser.add_argument('--id', dest='project_id')
  parser.add_argument('--subdir', dest='subdir')
  parser.add_argument('--installdir', dest='install_dir')
  parser.add_argument('--sources', dest='sources')
  parser.add_argument('--media', dest='media', default='')
  parser.add_argument('--langs', dest='langs', default='')
  parser.add_argument('--symlinks', type=bool, dest='symlinks', default=False)
  
  def build_pot(srcdir, project_id, sources):
      # Must be relative paths
      sources = [os.path.join('C', source) for source in sources]
      outfile = os.path.join(srcdir, project_id + '.pot')
      subprocess.call(['itstool', '-o', outfile] + sources)
  
  def update_po(srcdir, project_id, langs):
      potfile = os.path.join(srcdir, project_id + '.pot')
      for lang in langs:
          pofile = os
  
  [... the rest is omitted ...]
files.old_path: mesonbuild/scripts/yelphelper.py