code: def build_from_path(package, path, dry_run=False, env='default', outfilename=DEFAULT_BUILDFILE):
      
      team, owner, pkg, subpath = parse_package(package, allow_subpath=True)
  
      if not os.path.exists(path):
          raise CommandException("%s does not exist." % path)
  
      try:
          if os.path.isdir(path):
              buildpath = os.path.join(path, outfilename)
              if os.path.exists(buildpath):
                  raise CommandException(
                      "Build file already exists. Run `quilt build %r` instead." % buildpath
                  )
  
              contents = generate_contents(path, outfilename)
              build_package_from_contents(team, owner, pkg, subpath, path, contents, dry_run=dry_run, env=env)
          else:
              build_package(team, owner, pkg, subpath, path, dry_run=dry_run, env=env)
  
          if not dry_run:
              print("Built %s successfully." % package)
      except BuildException as ex:
          raise CommandException("Failed to build the package: %s" % ex)
docs: Compile a Quilt data package from a build file.
      Path can be a directory, in which case the build file will be generated automatically.