MCPcopy Create free account
hub / github.com/conda/constructor / main

Function main

constructor/main.py:546–693  ·  view source on GitHub ↗
(argv=None)

Source from the content-addressed store, hash-verified

544
545
546def main(argv=None):
547 logging.basicConfig(level=logging.INFO)
548 p = argparse.ArgumentParser(description="build an installer from <DIRECTORY>/construct.yaml")
549
550 p.add_argument("--help-construct", action=_HelpConstructAction)
551
552 p.add_argument("--debug", action="store_true")
553
554 p.add_argument(
555 "--output-dir",
556 action="store",
557 default=os.getcwd(),
558 help="path to directory in which output installer is written "
559 f"to, defaults to CWD ('{os.getcwd()}')",
560 metavar="PATH",
561 )
562
563 p.add_argument(
564 "--cache-dir",
565 action="store",
566 default=DEFAULT_CACHE_DIR,
567 help="cache directory, used for downloading conda packages, "
568 "may be changed by CONSTRUCTOR_CACHE, "
569 f"defaults to '{DEFAULT_CACHE_DIR}'",
570 metavar="PATH",
571 )
572
573 p.add_argument("--clean", action="store_true", help="clean out the cache directory and exit")
574
575 p.add_argument(
576 "--platform",
577 action="store",
578 default=cc_platform,
579 help="the platform for which installer is for, "
580 f"defaults to '{cc_platform}'. Options, e.g.: {SUPPORTED_PLATFORMS}",
581 )
582
583 p.add_argument(
584 "--dry-run",
585 help="solve package specs but do not create installer",
586 default=False,
587 action="store_true",
588 )
589 p.add_argument(
590 "--render",
591 help="Parse and render the construct.yaml file",
592 action="store_true",
593 )
594
595 p.add_argument("-v", "--verbose", action="store_true")
596
597 p.add_argument(
598 "-V",
599 "--version",
600 help="display the version being used and exit",
601 action="version",
602 version=f"%(prog)s {__version__}",
603 )

Callers 3

__main__.pyFile · 0.90
test_dry_runFunction · 0.90
main.pyFile · 0.70

Calls 2

normalize_pathFunction · 0.85
main_buildFunction · 0.85

Tested by 1

test_dry_runFunction · 0.72