Commit Graph

27 Commits

Author SHA1 Message Date
kennethreitz 9b4fba451b more markers
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-03-04 07:54:41 -05:00
Dan Ryan 7fb93b699b Comment and divide out tests for requirements 2018-02-11 04:05:32 -05:00
Dan Ryan eea5d57b9f Fix VCS requirement generation
- 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
2018-02-04 22:27:10 -05:00
Dan Ryan b9feb06f59 Properly parse urls as Link objects
- Fixes #1121
- Adds a bunch of tests for pipenv.utils.get_requirement()
2018-02-04 22:25:42 -05:00
Tzu-ping Chung e73d2bfa17 Force Windows local drive names to uppercase
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.
2018-01-27 03:20:35 -05:00
Dan Ryan 6e7dd14cd3 Refactor do_install lockfile splitting
- Break out functions to split file and sections
- Break out function to merge dependencies
2017-11-30 11:45:43 -05:00
Dan Ryan 3ac8b89a83 Do sequential installs on editable dependencies
- 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
2017-11-30 11:45:40 -05:00
Dan Ryan d320bc4b1e Fix local and relative path installation
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>
2017-11-14 00:39:57 -05:00
Dan Ryan f1e98c5e52 Add tests for is_vcs changes to prevent regression
- Fix vcs test for git+git syntax
2017-11-04 21:41:34 -04:00
Hamad AlGhanim 9c4b68605c fix for #925 (#930)
* fix for adding newline

* added test to ensure fix #925
2017-10-18 10:07:17 -07:00
Hamad alghanim ee9c012d0c added test for remote req file utils 2017-10-18 08:33:15 -07:00
Dan Ryan aeafce54a6 Add tests for windows paths with spaces 2017-10-15 19:45:54 -04:00
Dan Ryan 946e16653b Add vcs tests to account for changes in #807
Signed-off-by: Dan Ryan <dan@danryan.co>
2017-10-07 00:48:57 -04:00
kennethreitz f48b33071c god these tests are the worst
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2017-09-25 17:47:28 -04:00
Eli Boyarski 33e99572d3 Added a test for utils.python_version 2017-09-16 11:21:58 +03:00
kennethreitz 068b7ab1b7 stole @jacebrowning's tests (modified)
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2017-09-15 11:15:20 -04:00
Nicolas Delaby 9dc5eb8398 Add support for extras_require in Pipfile for vcs urls 2017-09-13 20:10:47 +02:00
kennethreitz 7297fdf084 PASSED!
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2017-09-01 20:17:41 -04:00
kennethreitz d5d2f38d8b phew
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2017-09-01 20:04:39 -04:00
Ed Morley c5e7ac933d Whitespace cleanup for flake8
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)
2017-05-25 20:24:52 +01:00
Christian Sauer d60b42d147 handle package[extra]==version properly
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.
2017-05-17 15:29:27 -04:00
Nate Prewitt 0441eb8573 correct expected test output 2017-03-14 09:52:57 -06:00
Nate Prewitt d124103ab0 use six.string_types instead of str to handle unicode in Python2 2017-03-14 09:45:56 -06:00
Nate Prewitt c37a0143f3 test internal pipfile/lock representations and new utils 2017-02-28 11:16:14 -07:00
Nate Prewitt 7dae3bd013 add error message for vcs dependency without #egg fragment 2017-02-27 09:08:13 -07:00
Nate Prewitt 69a89ec8df tests for utils (hashes, revisions, and versions) 2017-02-10 07:52:15 -07:00
Nate Prewitt e5f1b61f8c initial testing work 2017-02-02 16:57:14 -07:00