mirror of
https://github.com/kennethreitz/heroku-buildpack-python.git
synced 2026-06-17 21:40:58 +00:00
27 lines
446 B
Python
Executable File
27 lines
446 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
import json
|
|
import sys
|
|
|
|
|
|
def main():
|
|
INFILE = sys.argv[1]
|
|
|
|
with open(INFILE, 'rb') as f:
|
|
lockfile = json.load(f)
|
|
|
|
packages = []
|
|
for package in lockfile.get('default', {}):
|
|
try:
|
|
packages.append('{0}{1}'.format(package, lockfile['default'][package]['version']))
|
|
except KeyError:
|
|
pass
|
|
|
|
print('\n'.join(packages))
|
|
|
|
|
|
try:
|
|
main()
|
|
except Exception:
|
|
pass
|