- Fixes issues when turning vcs lines into requirements
- At some point there was a regression around this which treats them as
normal paths
- This now follows pip practices as well
- Big todo: clean up duplicate functionality / break out logic for
requirements parsing
- Adds regression test for this case
This updates
test_editable_vcs_install_in_pipfile_with_dependency_resolution_doesnt_traceback
to check (a) that dependency resolution was triggered, and (b) that
there was no traceback (rather than just the specific traceback we are
currently seeing).
Quoting the executable results in a traceback on Linux systems (because
the quotes added by shellquote are considered part of the executable
name), and is unnecessary on Windows systems.
This fixes#1240.
- Fixes#1225
- Add checks for Wheel files and archive files specifically
- Adopts egg-fragment parsing for local file paths to allow naming of
filesystem paths as well
- Adds these checks both to the get_requirement() function and the
is_installable_file() function
If the output of ``pip freeze`` contains comments (e. g. a line like ``## !! Could not determine repository location``), then the ``pipenv update`` command fails when it tries to parse the requirements:
``python
(project-cIS5-zzV) bash-3.2$ pipenv update -d
Updating all dependencies from Pipfile…
Traceback (most recent call last):
File "/.local/bin/pipenv", line 11, in <module>
sys.exit(cli())
File "/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/vendor/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/cli.py", line 2559, in update
do_purge()
File "/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/cli.py", line 1230, in do_purge
dep = convert_deps_from_pip(package)
File "/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/utils.py", line 624, in convert_deps_from_pip
req = get_requirement(dep)
File "/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/utils.py", line 311, in get_requirement
req = [r for r in requirements.parse(dep)][0]
IndexError: list index out of range
``
It tries to make sense of the ``##`` "requirement", which fails.
This commit adds a simple fix to ignore comments in the ``pip freeze`` output.
Windows generally use upper cased drive names, but allow (without
normalizing) lower cased names in cmd.exe, which results in
inconsistencies when hashing the full path (to get the name of the
project's virtualenv). Python does not provide a good solution[*], so we
need to roll our own.
[*]: Python does have os.path.normcase(), but it always converts the
whole paths to lowercase. This would break virtually *all* existing
virtualenvs for Windows users.
UNC host names (which Python also treats as drives), on the other hand,
can actually be either cased. I am not sure if they are case-sensitive,
or should be coerced to what case, so this patch keeps with the existing
behaviour, and does not try to coerce them.
- Add --system Flag to all CLI functions that interact with python
environments
- Add 'envvar' parameter to click options to parse into system flag if
we miss it in environments.py
* Fixed broken links to fancy install methods
Outside of the TOC blocks it was referring to install.html instead of /install/ and resulted in broken links.