def main():
if '--version' in sys.argv[1:]:
# Can't be part of argparse because the 'packages' is mandatory
# print out the version of self
import pkg_resources
print(pkg_resources.get_distribution('hashin').version)
return 0
args = parser.parse_args()
try:
return run(
args.packages,
args.requirements_file,
args.algorithm,
args.python_version,
verbose=args.verbose,
)
except PackageError as exception:
print(str(exception), file=sys.stderr)
return 1
评论列表
文章目录