def METHOD_NAME(subparser):
    global directories
    directories = subparser.add_mutually_exclusive_group()
    directories.add_argument(
        "-m", "--module-dir", action="store_true", help="spack python module directory"
    )
    directories.add_argument(
        "-r", "--spack-root", action="store_true", help="spack installation root"
    )
    directories.add_argument(
        "-i",
        "--install-dir",
        action="store_true",
        help="install prefix for spec (spec need not be installed)",
    )
    directories.add_argument(
        "-p",
        "--package-dir",
        action="store_true",
        help="directory enclosing a spec's package.py file",
    )
    directories.add_argument(
        "-P", "--packages", action="store_true", help="top-level packages directory for Spack"
    )
    directories.add_argument(
        "-s", "--stage-dir", action="store_true", help="stage directory for a spec"
    )
    directories.add_argument(
        "-S", "--stages", action="store_true", help="top level stage directory"
    )
    directories.add_argument(
        "--source-dir",
        action="store_true",
        help="source directory for a spec (requires it to be staged first)",
    )
    directories.add_argument(
        "-b",
        "--build-dir",
        action="store_true",
        help="build directory for a spec (requires it to be staged first)",
    )
    directories.add_argument(
        "-e",
        "--env",
        action="store",
        dest="location_env",
        nargs="?",
        metavar="name",
        default=False,
        help="location of the named or current environment",
    )
    subparser.add_argument(
        "--first",
        action="store_true",
        default=False,
        dest="find_first",
        help="use the first match if multiple packages match the spec",
    )
    arguments.add_common_arguments(subparser, ["spec"])