mirror of
https://github.com/bndr/pipreqs.git
synced 2025-06-06 03:25:21 +00:00
fix(pipreqs): More verbose output
This commit is contained in:
parent
bdd8b66235
commit
ecc8db88f5
@ -33,6 +33,9 @@ Example
|
|||||||
::
|
::
|
||||||
|
|
||||||
$ pipreqs /home/project/location
|
$ 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
|
Successfuly saved requirements file in: /home/project/location/requirements.txt
|
||||||
|
|
||||||
Why not pip freeze?
|
Why not pip freeze?
|
||||||
|
@ -77,8 +77,11 @@ def get_imports_info(imports):
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
def init(args):
|
def init(args):
|
||||||
|
print ("Looking for imports")
|
||||||
imports = get_all_imports(args['<path>'])
|
imports = get_all_imports(args['<path>'])
|
||||||
|
print ("Getting latest version of packages information from PyPi")
|
||||||
imports_with_info = get_imports_info(imports)
|
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")
|
path = args["--savepath"] if args["--savepath"] else os.path.join(args['<path>'],"requirements.txt")
|
||||||
generate_requirements_file(path, imports_with_info)
|
generate_requirements_file(path, imports_with_info)
|
||||||
print ("Successfuly saved requirements file in: " + path)
|
print ("Successfuly saved requirements file in: " + path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user