From 399132dcf808e1271ebf377dd7c213624341db2d Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 12 Sep 2017 12:32:03 -0400 Subject: [PATCH] improvements to windows and such Signed-off-by: Kenneth Reitz --- pipenv/cli.py | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/pipenv/cli.py b/pipenv/cli.py index b5981b58..4d3c79eb 100644 --- a/pipenv/cli.py +++ b/pipenv/cli.py @@ -66,18 +66,24 @@ BAD_PACKAGES = ( 'pyparsing', 'appdirs', 'pipenv' ) -now = time.localtime() +if os.name != 'nt': + now = time.localtime() -# Halloween easter-egg. -if ((now.tm_mon == 10) and (now.tm_day == 30)) or ((now.tm_mon == 10) and (now.tm_day == 31)): - INSTALL_LABEL = '🎃 ' + # Halloween easter-egg. + if ((now.tm_mon == 10) and (now.tm_day == 30)) or ((now.tm_mon == 10) and (now.tm_day == 31)): + INSTALL_LABEL = '🎃 ' -# Chrismas easter-egg. -elif ((now.tm_mon == 12) and (now.tm_day == 24)) or ((now.tm_mon == 12) and (now.tm_day == 25)): - INSTALL_LABEL = '🎅 ' + # Chrismas easter-egg. + elif ((now.tm_mon == 12) and (now.tm_day == 24)) or ((now.tm_mon == 12) and (now.tm_day == 25)): + INSTALL_LABEL = '🎅 ' + else: + INSTALL_LABEL = '🐍 ' + + INSTALL_LABEL2 = crayons.white('☤ ', bold=True) else: - INSTALL_LABEL = '🐍 ' + INSTALL_LABEL = ' ' + INSTALL_LABEL2 = ' ' # Enable shell completion. click_completion.init() @@ -421,7 +427,7 @@ def do_install_dependencies( click.echo(crayons.white(u'Installing initially–failed dependencies…', bold=True)) - for dep, ignore_hash in progress.bar(failed_deps_list, label=crayons.white('☤ ', bold=True) if os.name != 'nt' else ''): + for dep, ignore_hash in progress.bar(failed_deps_list, label=INSTALL_LABEL2): # Install the module. c = pip_install( dep,