old_contents: """Configure code with CMake."""
  from dodo_commands.system_commands import DodoCommand
  
  class Command(DodoCommand):  # noqa
      docker_options = [('name', 'cmake')]
  
      def handle_imp(self, **kwargs):  # noqa
          self.runcmd(
              ["cmake"] +
              [
                  "-D%s=%s" % x for x in
                  self.get_config('/CMAKE/variables').items()
              ] +
              [self.get_config("/ROOT/src_dir")],
              cwd=self.get_config("/ROOT/build_dir")
          )
  
new_contents: from argparse import ArgumentParser
  from dodo_commands.framework import Dodo
  
  
  def _args():  # noqa
      parser = ArgumentParser(description='Configure code with CMake')
      args = Dodo.parse_args(parser)
      args.src_dir = Dodo.get_config("/ROOT/src_dir")
      args.build_dir = Dodo.get_config("/ROOT/build_dir")
      return args
  
  
  if Dodo.is_main(__name__):
      args = _args()
      Dodo.runcmd(
          ["cmake"] +
          [
              "-D%s=%s" % x for x in
              Dodo.get_config('/CMAKE/variables').items()
          ] +
          [args.src_dir],
          cwd=args.build_dir
      )
  
subject: Update cmake.py to latest Dodo Commands version