Sha256: 305b011abd5b50ac11ba5222bf3fc21b2419b3919fb6593d53f8e76cb84c5fc1

Contents?: true

Size: 906 Bytes

Versions: 22

Compression:

Stored size: 906 Bytes

Contents

#!/usr/bin/env python

import json
import sys

try:
        from pip._internal.req import parse_requirements
except ImportError:
        from pip.req import parse_requirements
try:
        from pip._internal.download import PipSession
except ImportError:
        from pip.download import PipSession

from pip._vendor import pkg_resources
from pip._vendor.six import print_

requirements = [pkg_resources.Requirement.parse(str(req.req)) for req
                in parse_requirements(sys.argv[1], session=PipSession()) if req.req != None]

transform = lambda dist: {
        'name': dist.project_name,
        'version': dist.version,
        'location': dist.location,
        'dependencies': list(map(lambda dependency: dependency.project_name, dist.requires())),
        }

packages = [transform(dist) for dist
            in pkg_resources.working_set.resolve(requirements)]

print_(json.dumps(packages))

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
license_finder-5.11.1 bin/license_finder_pip.py
license_finder-5.11.0 bin/license_finder_pip.py
license_finder-5.10.2 bin/license_finder_pip.py
license_finder-5.10.1 bin/license_finder_pip.py
license_finder-5.10.0 bin/license_finder_pip.py
license_finder-5.9.2 bin/license_finder_pip.py
license_finder-5.9.1 bin/license_finder_pip.py
license_finder-5.9.0 bin/license_finder_pip.py
license_finder-5.8.0 bin/license_finder_pip.py
license_finder-5.7.1 bin/license_finder_pip.py
license_finder-5.7.0 bin/license_finder_pip.py
license_finder-5.6.2 bin/license_finder_pip.py
license_finder-5.6.1 bin/license_finder_pip.py
license_finder-5.6.0 bin/license_finder_pip.py
license_finder-5.5.2 bin/license_finder_pip.py
license_finder-5.5.1 bin/license_finder_pip.py
license_finder-5.5.0 bin/license_finder_pip.py
license_finder-5.4.1 bin/license_finder_pip.py
license_finder-5.4.0 bin/license_finder_pip.py
license_finder-5.3.0 bin/license_finder_pip.py