From 625d642f63a1169938f9d0563b95e29bf2b1805e Mon Sep 17 00:00:00 2001 From: Erin O'Connell Date: Thu, 7 Sep 2017 22:12:49 -0600 Subject: [PATCH 1/6] fixed shellquote on windows --- pipenv/__version__.py | 2 +- pipenv/cli.py | 8 ++++++-- pipenv/utils.py | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pipenv/__version__.py b/pipenv/__version__.py index 2251d726..ccc03aa0 100644 --- a/pipenv/__version__.py +++ b/pipenv/__version__.py @@ -3,4 +3,4 @@ # //___/ / / / //___/ / // // / / || / / # // / / // ((____ // / / ||/ / -__version__ = '6.1.5' +__version__ = '6.1.6' diff --git a/pipenv/cli.py b/pipenv/cli.py index 39ead9c2..5bc706b0 100644 --- a/pipenv/cli.py +++ b/pipenv/cli.py @@ -501,7 +501,7 @@ def get_downloads_info(names_map, section): def do_lock(no_hashes=True, verbose=False, legacy=False): """Executes the freeze functionality.""" - + print(no_hashes, verbose, legacy) if not legacy: # Alert the user of progress. click.echo(crayons.yellow('Locking {0} dependencies...'.format(crayons.red('[dev-packages]'))), err=True) @@ -580,7 +580,11 @@ def do_lock(no_hashes=True, verbose=False, legacy=False): lockfile['default'][dep['name']]['hashes'] = dep['hashes'] # Run the PEP 508 checker in the virtualenv, add it to the lockfile. - c = delegator.run('"{0}" {1}'.format(which('python'), shellquote(pep508checker.__file__.rstrip('cdo')))) + cmd = '"{0}" {1}'.format(which('python'), shellquote(pep508checker.__file__.rstrip('cdo'))) + c = delegator.run(cmd) + # print("Cmd: {0}".format(cmd)) + # print("Return Code: {0}".format(c.return_code)) + # print("Out: {0}".format(c.out)) lockfile['_meta']['host-environment-markers'] = json.loads(c.out) # Write out the lockfile. diff --git a/pipenv/utils.py b/pipenv/utils.py index 51cefd20..139a5531 100644 --- a/pipenv/utils.py +++ b/pipenv/utils.py @@ -23,7 +23,7 @@ class PipCommand(pip.basecommand.Command): def shellquote(s): - return "'" + s.replace("'", "'\\''") + "'" + return '"' + s.replace("'", "'\\''") + '"' def clean_pkg_version(version): From 3116882fe67d7cdd7725194aac73ec7e9b5cb240 Mon Sep 17 00:00:00 2001 From: Erin O'Connell Date: Thu, 7 Sep 2017 22:57:27 -0600 Subject: [PATCH 2/6] all tests pass on my local windows 10 machine, come on app veyor --- test_windows/test_pipenv.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test_windows/test_pipenv.py b/test_windows/test_pipenv.py index b1877ed5..1c350948 100644 --- a/test_windows/test_pipenv.py +++ b/test_windows/test_pipenv.py @@ -151,7 +151,7 @@ class TestPipenvWindows(): pipfile_output = delegator.run('type Pipfile').out pipfile_list = pipfile_output.split('\n') - assert 'Werkzeug = "*"' in pipfile_list + assert 'werkzeug = "*"' in pipfile_list assert 'pytest = "*"' in pipfile_list assert '[packages]' in pipfile_list assert '[dev-packages]' in pipfile_list @@ -182,6 +182,8 @@ class TestPipenvWindows(): # Build the environment. os.environ['PIPENV_VENV_IN_PROJECT'] = '1' + assert delegator.run('copy /y nul Pipfile').return_code == 0 + assert delegator.run('pipenv --python python').return_code == 0 # Install packages for test. assert delegator.run('pipenv install pep8').return_code == 0 From 9f5d22ac11fe838798d8a30513a1f8ad198fc86a Mon Sep 17 00:00:00 2001 From: Erin O'Connell Date: Thu, 7 Sep 2017 23:05:02 -0600 Subject: [PATCH 3/6] fixed flake8 variable assignment complaint --- pipenv/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pipenv/cli.py b/pipenv/cli.py index 5bc706b0..d5308e91 100644 --- a/pipenv/cli.py +++ b/pipenv/cli.py @@ -1251,7 +1251,7 @@ def update(dev=False, three=None, python=None, dry_run=False, bare=False, dont_u ensure_project(three=three, python=python, validate=False) # --dry-run if dry_run: - dont_upgrade = True + # dont_upgrade = True updates = False # Dev packages From 6f5df44a4e7f17d0b5503a48ff9d4ea0a89422d0 Mon Sep 17 00:00:00 2001 From: Erin O'Connell Date: Thu, 7 Sep 2017 23:11:36 -0600 Subject: [PATCH 4/6] removed debug message --- pipenv/cli.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pipenv/cli.py b/pipenv/cli.py index d5308e91..f070b9ce 100644 --- a/pipenv/cli.py +++ b/pipenv/cli.py @@ -501,7 +501,6 @@ def get_downloads_info(names_map, section): def do_lock(no_hashes=True, verbose=False, legacy=False): """Executes the freeze functionality.""" - print(no_hashes, verbose, legacy) if not legacy: # Alert the user of progress. click.echo(crayons.yellow('Locking {0} dependencies...'.format(crayons.red('[dev-packages]'))), err=True) From abe1218fc7f1d06e55c84337970d1d7b09be5a4c Mon Sep 17 00:00:00 2001 From: Erin O'Connell Date: Thu, 7 Sep 2017 23:22:25 -0600 Subject: [PATCH 5/6] Added a shied for app veyor! --- README.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.rst b/README.rst index 6098c595..85e58f28 100644 --- a/README.rst +++ b/README.rst @@ -19,6 +19,9 @@ Pipenv: Sacred Marriage of Pipfile, Pip, & Virtualenv .. image:: https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg :target: https://saythanks.io/to/kennethreitz +.. image:: https://img.shields.io/appveyor/ci/kennethreitz/pipenv.svg + :target: https://ci.appveyor.com/project/kennethreitz/pipenv/branch/master + --------------- **Pipenv** — the officially recommended Python packaging tool from `Python.org `_, free (as in freedom). From 9d864d88b2c3c1a03cb84ed6dcc1c289c8463bba Mon Sep 17 00:00:00 2001 From: Erin O'Connell Date: Thu, 7 Sep 2017 23:37:50 -0600 Subject: [PATCH 6/6] switched badge places --- README.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 85e58f28..4f2af082 100644 --- a/README.rst +++ b/README.rst @@ -15,13 +15,13 @@ Pipenv: Sacred Marriage of Pipfile, Pip, & Virtualenv .. image:: https://travis-ci.org/kennethreitz/pipenv.svg?branch=master :target: https://travis-ci.org/kennethreitz/pipenv + +.. image:: https://img.shields.io/appveyor/ci/kennethreitz/pipenv.svg + :target: https://ci.appveyor.com/project/kennethreitz/pipenv/branch/master .. image:: https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg :target: https://saythanks.io/to/kennethreitz -.. image:: https://img.shields.io/appveyor/ci/kennethreitz/pipenv.svg - :target: https://ci.appveyor.com/project/kennethreitz/pipenv/branch/master - --------------- **Pipenv** — the officially recommended Python packaging tool from `Python.org `_, free (as in freedom).