From 0ef24a98e3333d062a46ccfa3d0ee6b5ea7f7fb6 Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Wed, 7 Mar 2018 12:23:54 -0500 Subject: [PATCH] #1474 --- pipenv/core.py | 6 +++--- pipenv/pew/__init__.py | 0 pipenv/pew/__main__.py | 5 +++++ 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 pipenv/pew/__init__.py create mode 100644 pipenv/pew/__main__.py diff --git a/pipenv/core.py b/pipenv/core.py index 854a2582..836aaedf 100644 --- a/pipenv/core.py +++ b/pipenv/core.py @@ -937,7 +937,7 @@ def do_create_virtualenv(python=None, site_packages=False): cmd.append('--system-site-packages') else: # Default: use pew. - cmd = ['pew', 'new', project.virtualenv_name, '-d'] + cmd = ['python', '-m', 'pipenv.pew', 'new', project.virtualenv_name, '-d'] # Pass a Python version to virtualenv, if needed. if python: @@ -2074,8 +2074,8 @@ def do_shell(three=None, python=False, fancy=False, shell_args=None): else: workon_name = project.virtualenv_name - cmd = 'pew' - args = ["workon", workon_name] + cmd = 'python' + args = ['-m', 'pipenv.pew', 'workon', workon_name] # Grab current terminal dimensions to replace the hardcoded default # dimensions of pexpect diff --git a/pipenv/pew/__init__.py b/pipenv/pew/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pipenv/pew/__main__.py b/pipenv/pew/__main__.py new file mode 100644 index 00000000..16bc1552 --- /dev/null +++ b/pipenv/pew/__main__.py @@ -0,0 +1,5 @@ +import pew + +if __name__ == '__main__': + pew.pew.pew() +