old_contents: # swift_build_support/products/swiftpm.py -----------------------*- python -*-
  #
  # This source file is part of the Swift.org open source project
  #
  # Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors
  # Licensed under Apache License v2.0 with Runtime Library Exception
  #
  # See https://swift.org/LICENSE.txt for license information
  # See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
  #
  # ----------------------------------------------------------------------------
  
  import os
  
  from . import product
  from .. import shell
  
  
  class SwiftPM(product.Product):
      @classmethod
      def product_source_name(cls):
          return "swiftpm"
  
      @classmethod
      def is_build_script_impl_product(cls):
          return False
  
      def should_build(self, host_target):
          return True
  
      def run_bootstrap_script(self, action, host_target, additional_params=[]):
          script_path = os.path.join(
              self.source_dir, 'Utilities', 'new-bootstrap')
          toolchain_path = self.install_toolchain_path()
          swiftc = os.path.join(toolchain_path, "usr", "bin", "swiftc")
  
          # FIXME: We require llbuild build directory in order to build. Is
          # there a better way to get this?
          build_root = os.path.dirname(self.build_dir)
          llbuild_build_dir = os.path.join(
              build_root, '%s-%s' % ("llbuild", host_target))
  
          helper_cmd = [script_path, action]
  
          if self.is_release():
              helper_cmd.append("--release")
  
          helper_cmd += [
              "--swiftc-path", swiftc,
              "--clang-path", self.toolchain.cc,
              "--cmake-path", self.toolchain.cmake,
              "--ninja-path", self.toolchain.ninja,
              "--build-dir", self.build_dir,
              "--llbuild-build-dir", llbuild_build_dir
          ]
          helper_cmd.extend(additional_params)
  
          shell.call(helper_cmd)
  
      def build(self, host_target):
          self.run_bootstrap_script('build', host_target)
  
      def should_test(self, host_target):
          return self.args.test_swiftpm
  
      def test(self, host_target):
          self.run_bootstrap_script('test', host_target)
  
      def should_install(self, host_target):
          return self.args.install_swiftpm
  
      def install(self, host_target):
          install_prefix = self.args.install_destdir + self.args.install_prefix
          self.run_bootstrap_script('install', host_target, [
              '--prefix', install_prefix
          ])
  
new_contents: # swift_build_support/products/swiftpm.py -----------------------*- python -*-
  #
  # This source file is part of the Swift.org open source project
  #
  # Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors
  # Licensed under Apache License v2.0 with Runtime Library Exception
  #
  # See https://swift.org/LICENSE.txt for license information
  # See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
  #
  # ----------------------------------------------------------------------------
  
  import os
  
  from . import product
  from .. import shell
  
  
  class SwiftPM(product.Product):
      @classmethod
      def product_source_name(cls):
          return "swiftpm"
  
      @classmethod
      def is_build_script_impl_product(cls):
          return False
  
      def should_build(self, host_target):
          return True
  
      def run_bootstrap_script(self, action, host_target, additional_params=[]):
          script_path = os.path.join(
              self.source_dir, 'Utilities', 'bootstrap')
          toolchain_path = self.install_toolchain_path()
          swiftc = os.path.join(toolchain_path, "usr", "bin", "swiftc")
  
          # FIXME: We require llbuild build directory in order to build. Is
          # there a better way to get this?
          build_root = os.path.dirname(self.build_dir)
          llbuild_build_dir = os.path.join(
              build_root, '%s-%s' % ("llbuild", host_target))
  
          helper_cmd = [script_path, action]
  
          if self.is_release():
              helper_cmd.append("--release")
  
          helper_cmd += [
              "--swiftc-path", swiftc,
              "--clang-path", self.toolchain.cc,
              "--cmake-path", self.toolchain.cmake,
              "--ninja-path", self.toolchain.ninja,
              "--build-dir", self.build_dir,
              "--llbuild-build-dir", llbuild_build_dir
          ]
          helper_cmd.extend(additional_params)
  
          shell.call(helper_cmd)
  
      def build(self, host_target):
          self.run_bootstrap_script('build', host_target)
  
      def should_test(self, host_target):
          return self.args.test_swiftpm
  
      def test(self, host_target):
          self.run_bootstrap_script('test', host_target)
  
      def should_install(self, host_target):
          return self.args.install_swiftpm
  
      def install(self, host_target):
          install_prefix = self.args.install_destdir + self.args.install_prefix
          self.run_bootstrap_script('install', host_target, [
              '--prefix', install_prefix
          ])
  
subject: Replace new-bootstrap with bootstrap