code: def Clean(self):
      
      # os.unlink doesn't work effectively, use the shell to delete.
      if os.path.exists(args.build_dir):
        subprocess.call("rd /s /q %s" % args.build_dir, shell=True)
      if os.path.exists(args.output_dir):
        subprocess.call("rd /s /q %s" % args.output_dir, shell=True)
  
      os.makedirs(args.build_dir)
      os.makedirs(args.output_dir)
  
      # Create virtualenvs.
      if not args.virtualenv_64bit:
        subprocess.check_call([self.virtualenv_bin64, self.virtualenv64])
      if args.build_32 and not args.virtualenv_32bit:
        subprocess.check_call([self.virtualenv_bin32, self.virtualenv32])
  
      # Currently this should do nothing as we will already have a modern pip
      # installed, but we leave this here so if we get broken by pip again it's
      # just a simple case of searching for pip>=8.1.1 and adding an upper limit
      # cap in all those places.
  
      cmd = ["-m", "pip", "install"]
      if args.wheel_dir:
        cmd += ["--no-index", r"--find-links=file:///%s" % args.wheel_dir]
  
      subprocess.check_call([self.virtualenv_python64] + cmd +
                            ["--upgrade", "pip>=8.1.1"])
      if args.build_32:
        subprocess.check_call([self.virtualenv_python32] + cmd +
                              ["--upgrade", "pip>=8.1.1"])
      os.environ["PROTOC"] = args.protoc
docs: Clean the build environment.