How to use the johnnydep.__version__ function in johnnydep

To help you get started, we’ve selected a few johnnydep examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wimglenn / johnnydep / johnnydep / cli.py View on Github external
parser.add_argument("--extra-index-url")
    parser.add_argument(
        "--output-format",
        "-o",
        choices=["human", "json", "yaml", "python", "toml", "pinned"],
        default="human",
    )
    parser.add_argument(
        "--no-deps", help="Don't recurse the dependency tree", dest="recurse", action="store_false"
    )
    parser.add_argument(
        "--fields", "-f", nargs="*", default=default_fields, choices=list(FIELDS) + ["ALL"]
    )
    parser.add_argument("--for-python", "-p", dest="env", type=python_interpreter)
    parser.add_argument("--verbose", "-v", default=1, type=int, choices=range(3))
    parser.add_argument("--version", action="version", version="%(prog)s v{}".format(johnnydep.__version__))
    args = parser.parse_args()
    if "ALL" in args.fields:
        args.fields = list(FIELDS)
    configure_logging(verbosity=args.verbose)
    dist = JohnnyDist(args.req, index_url=args.index_url, env=args.env, extra_index_url=args.extra_index_url)
    print(dist.serialise(fields=args.fields, format=args.output_format, recurse=args.recurse))