From 4e00632b3e78daa979c4d56d2efa4a7444433913 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 12 Sep 2017 11:56:40 -0400 Subject: [PATCH] easter eggs (but not on easter, it's too hard) Signed-off-by: Kenneth Reitz --- pipenv/cli.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/pipenv/cli.py b/pipenv/cli.py index f29ba42b..c435fd12 100644 --- a/pipenv/cli.py +++ b/pipenv/cli.py @@ -7,6 +7,7 @@ import sys import distutils.spawn import shutil import signal +import time import tempfile import background @@ -14,7 +15,6 @@ import click import click_completion import crayons import delegator -import parse import pexpect import requests import pip @@ -66,6 +66,19 @@ BAD_PACKAGES = ( 'pyparsing', 'appdirs', 'pipenv' ) +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_EMOJI = u'🎃' + +# Chrismas easter-egg. +elif ((now.tm_mon == 12) and (now.tm_day == 24)) or ((now.tm_mon == 12) and (now.tm_day == 25)): + INSTALL_EMOJI = u'🎅' + +else: + INSTALL_EMOJI = u'🌻' + # Enable shell completion. click_completion.init() @@ -378,7 +391,7 @@ def do_install_dependencies( sys.exit(0) # pip install: - for dep, ignore_hash in progress.bar(deps_list, label='🌻 ' if os.name != 'nt' else ''): + for dep, ignore_hash in progress.bar(deps_list, label='{0} '.format(INSTALL_EMOJI) if os.name != 'nt' else ''): # Install the module. c = pip_install(