Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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))
parser = ArgumentParser()
parser.add_argument("dist_name")
parser.add_argument("--index-url", "-i")
parser.add_argument("--extra-index-url")
parser.add_argument("--for-python", "-p", dest="env", type=python_interpreter)
parser.add_argument("--verbose", "-v", default=1, type=int, choices=range(3))
debug = {
"sys.argv": sys.argv,
"sys.executable": sys.executable,
"sys.version": sys.version,
"sys.path": sys.path,
"pip.__version__": pip.__version__,
"pip.__file__": pip.__file__,
}
args = parser.parse_args()
configure_logging(verbosity=args.verbose)
log.debug("runtime info", **debug)
result = get(dist_name=args.dist_name, index_url=args.index_url, env=args.env, extra_index_url=args.extra_index_url)
text = json.dumps(result, indent=2, sort_keys=True, separators=(",", ": "))
print(text)
from pathlib import Path
from operator import attrgetter
from collections import namedtuple, defaultdict
from distutils.version import StrictVersion
from pkg_resources import (RequirementParseError,
Requirement as _RequirementBase)
from setuptools.command.test import test as _TestCommand
from setuptools.command.develop import develop as _DevelopCommand
from setuptools.command.install import install as _InstallCommand
try:
import johnnydep
from johnnydep.lib import JohnnyDist
from johnnydep.logs import configure_logging
configure_logging(0)
except ImportError:
johnnydep = None
VERSION = "1.0a4"
_EXTRA = "extra_"
_REQ_D = Path("requirements")
_CFG_INFO_SECT = "parcyl"
_CFG_REQS_SECT = "parcyl:requirements"
STATUS_CLASSIFIERS = {
# "alpha": "Development Status :: 1 - Planning",
# "alpha": "Development Status :: 2 - Pre-Alpha",
"alpha": "Development Status :: 3 - Alpha",
"beta": "Development Status :: 4 - Beta",
"final": "Development Status :: 5 - Production/Stable",