Skip to content

Commit

Permalink
fix(pipreqs): More verbose output
Browse files Browse the repository at this point in the history
  • Loading branch information
bndr committed Apr 24, 2015
1 parent bdd8b66 commit ecc8db8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ Example
::

$ pipreqs /home/project/location
Looking for imports
Getting latest version of packages information from PyPi
Found third-party imports: flask, requests, sqlalchemy, docopt
Successfuly saved requirements file in: /home/project/location/requirements.txt
Why not pip freeze?
Expand Down
3 changes: 3 additions & 0 deletions pipreqs/pipreqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,11 @@ def get_imports_info(imports):
return result

def init(args):
print ("Looking for imports")
imports = get_all_imports(args['<path>'])
print ("Getting latest version of packages information from PyPi")
imports_with_info = get_imports_info(imports)
print ("Found third-party imports: " + ", ".join(imports))
path = args["--savepath"] if args["--savepath"] else os.path.join(args['<path>'],"requirements.txt")
generate_requirements_file(path, imports_with_info)
print ("Successfuly saved requirements file in: " + path)
Expand Down

0 comments on commit ecc8db8

Please sign in to comment.