Sha256: 2a67627028efff773a9c91bda43b7adbb51e877398357e96675f3e7ef0acabb6

Contents?: true

Size: 666 Bytes

Versions: 15

Compression:

Stored size: 666 Bytes

Contents

#!/usr/bin/env python

import json
from pip.req import parse_requirements
from pip.download import PipSession
from pip._vendor import pkg_resources
from pip._vendor.six import print_

requirements = [req.req for req
                in parse_requirements('requirements.txt', session=PipSession())]

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

15 entries across 15 versions & 1 rubygems

Version Path
license_finder-2.1.2 bin/license_finder_pip.py
license_finder-2.1.1 bin/license_finder_pip.py
license_finder-2.1.0 bin/license_finder_pip.py
license_finder-2.1.0.rc9 bin/license_finder_pip.py
license_finder-2.1.0.rc8 bin/license_finder_pip.py
license_finder-2.1.0.rc7 bin/license_finder_pip.py
license_finder-2.1.0.rc6 bin/license_finder_pip.py
license_finder-2.1.0.rc5 bin/license_finder_pip.py
license_finder-2.1.0.rc4 bin/license_finder_pip.py
license_finder-2.1.0.rc3 bin/license_finder_pip.py
license_finder-2.1.0.rc2 bin/license_finder_pip.py
license_finder-2.1.0.rc1 bin/license_finder_pip.py
license_finder-2.0.4 bin/license_finder_pip.py
license_finder-2.0.3 bin/license_finder_pip.py
license_finder-2.0.2 bin/license_finder_pip.py