- 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
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.
- Fixes#1111
- Uses existing infrastructure to add editable dependencies to the list
of sequentially installed packages
- Only alters functions used for this purpose
- Essentially there is a race condition because multiple editors are
trying to write to lib/site-packages/easy-install.pth for local editable
packages, so they overwrite one another
Summary of squashed commits:
* Handle relative paths more elegantly
* Wrapper around requirements.parse() for filesystem paths
* Undo previous hacks for simplicity
* Vendor pathlib2 for backwards compatibility
* Resolve relative paths for parsing, keep them relative in pipfile
* Add checks for empty req names and remote uris
* Add tests for local paths
* Fix test paramaterization
* Bugfixes for python27 and windows paths
* Fix windows tests
* Fix windows tests for python27 path encoding
* Re-vendor pathlib2 correctly
* Fix tests for windows paths
* Fix file and path checking
* Fix SCHEME_LIST rename
* Fix path resolution to check existence first
* Catch OSErrors for unpinned dependencies
* Last holdout of FILE_LIST conversion
* Fix for path resolution for unpinned packages
* Dont do path conversions on dictionaries
* Update docstring and comments
Signed-off-by: Dan Ryan <dan@danryan.co>
pipenv/cli.py:264:1: W293 blank line contains whitespace
pipenv/cli.py:546:1: E302 expected 2 blank lines, found 1
pipenv/environments.py:31:25: W292 no newline at end of file
pipenv/progress.py:171:23: W292 no newline at end of file
pipenv/utils.py:20:1: E302 expected 2 blank lines, found 1
pipenv/utils.py:206:6: E114 indentation is not a multiple of four (comment)
tests/test_project.py:8:1: E302 expected 2 blank lines, found 1
tests/test_utils.py:7:1: E302 expected 2 blank lines, found 1
tests/test_utils.py:75:5: E303 too many blank lines (2)
tests/test_utils.py:113:5: E303 too many blank lines (2)
tests/test_utils.py:124:5: E303 too many blank lines (2)
tests/test_utils.py:135:5: E303 too many blank lines (2)
Previously doing `pipenv install "django-rest-auth[with_social]==0.8.2` would
lose the extra information and if you edited the Pipfile by hand to
```
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
[packages.django-rest-auth]
version = "==0.8.2"
extras = [ "with_social",]
```
`pipenv update` would break with a malformed pip command.