Commit Graph

662 Commits

Author SHA1 Message Date
Dan Ryan 116d0857a2 Fix variable references
Signed-off-by: Dan Ryan <dan@danryan.co>

Fix variable references

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix variable references

Signed-off-by: Dan Ryan <dan@danryan.co>

Switch to powershell for windows virtualenv creation

Signed-off-by: Dan Ryan <dan@danryan.co>

use python version as path

Signed-off-by: Dan Ryan <dan@danryan.co>

use python version as path

Signed-off-by: Dan Ryan <dan@danryan.co>

swap variable name for python exe

Signed-off-by: Dan Ryan <dan@danryan.co>

add fallback for python exe

Signed-off-by: Dan Ryan <dan@danryan.co>

fix python variable setting

Signed-off-by: Dan Ryan <dan@danryan.co>

fix python variable setting

Signed-off-by: Dan Ryan <dan@danryan.co>

Use variable susbstitution for python executable location

Signed-off-by: Dan Ryan <dan@danryan.co>

Use activate script properly

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix floating quote in python version

Signed-off-by: Dan Ryan <dan@danryan.co>

Don't block on safety call in python 2 as it overwrites output for some reason

Signed-off-by: Dan Ryan <dan.ryan@xyleminc.com>

Don't block on pipenv graph either

Signed-off-by: Dan Ryan <dan@danryan.co>

Check command return code instead of calling `block`

Signed-off-by: Dan Ryan <dan@danryan.co>

Don't load json after its already loaded

Signed-off-by: Dan Ryan <dan@danryan.co>

Wait on return code before checking contents

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-03-16 15:11:05 -04:00
Dan Ryan 466fcc0a2a Fix test skip
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-03-16 15:10:51 -04:00
Dan Ryan 73129d8401 Fix internet connectivity test
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-03-16 15:10:50 -04:00
Dan Ryan 8fdc589d05 Fix test skip
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-03-16 15:10:50 -04:00
Dan Ryan dcfce70817 Fix python path discovery if not called python
- Begin a refactor of `delegator.run` invocation to ensure we capture
  and handle failures with our own exception wrappers
- Additoinally capture output and error logging and command information
  when running in verbose mode (should avoid significant repitition in
  the codebase)
- Refactor `which` and `system_which` to fallback to pythonfinder's
implementation
- Abstract `is_python_command` to identify whether we are looking for
  python, this enables us to rely on `pythonfinder.Finder.find_all_python_versions()`
  to ensure we aren't skipping python versions
- Fixes #2783

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-03-16 15:10:40 -04:00
Frost Ming bf2df74d72 Merge branch 'master' into bugfix/3502-trusted-host-custom-port 2019-03-07 09:07:15 +08:00
Dan Ryan 62a45e3323 Merge branch 'master' into bugfix/3502-trusted-host-custom-port 2019-03-06 19:09:01 -05:00
Dan Ryan 545ce5e7b5 Merge branch 'master' into i3292 2019-03-06 19:00:29 -05:00
Miro Hrončok ac44a238fb Update pytest-pypi documentation not to be pytest-httpbin documentation
Fixes https://github.com/pypa/pipenv/issues/3292
2019-02-26 11:34:51 +01:00
Dan Ryan b0ba9a8766 Update syntax for context manager virtualenv test class
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-23 14:23:18 -05:00
Dan Ryan 090619a6a1 Fix virtualenv tempdir lifespan
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-23 13:11:32 -05:00
Lee Bontecou c05066cfe3 add unittests 2019-02-22 12:21:27 -06:00
Dan Ryan 3bc48f034f Fix venv with leading dash test on windows and clean up tests
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-21 22:18:00 -05:00
Dan Ryan cd2cbd4e1a Avoid using which in cross platform tests
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-20 18:20:51 -05:00
Dan Ryan a47a26b87a Fix failing tests
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-20 11:51:15 -05:00
Dan Ryan 9340ddb962 Update tests to rectify issues
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-20 02:38:02 -05:00
Dan Ryan bfdb9aed87 Fix installed package discovery
- Exclude python when searching virtualenvs created using nested
  virtualenv interpreters (via `lib-dynload` library directory)

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-19 20:29:26 -05:00
Dan Ryan 5ac228e68f Fix test errors and local install for azure
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-19 09:34:48 -05:00
Dan Ryan a019de01cb Restore existing pyinstaller commit
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-17 03:05:23 -05:00
Dan Ryan e392b0232f Add additional test packages
- Allows more thorough testing of new resolution method

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-16 21:18:09 -05:00
Dan Ryan c049976936 Pass all packages through to venv_resolve_deps
- Use `project.parsed_pipfile` to get all packages instead of a filtered
  subset
- Determine index names via a new `refresh=True` argument to
  `project.get_source()` which clears the current pipfile cache
- Fix parsing of requirement lines from direct URLs which were
  previously excluding the `name@` portion and therefore generating
  invalid links

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-16 12:51:34 -05:00
Dan Ryan ef682bd58f Fix tuple bug in resolver
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-15 02:04:51 -05:00
Dan Ryan f5fda09b9d Direct URL updates and pep517 fixes
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-14 22:44:51 -05:00
Dan Ryan 19f2ee61e9 Update resolver to handle all resolution in venv
- Resolve all VCS and non-piptools-resolveable deps in venv
- Implement pep517 for resolution of non-setuptools builds
- Add full support for the new dependency link format
- Fix breakages from pip 19* rollout and subsequent setuptools breakage

Signed-off-by: Dan Ryan <dan.ryan@xyleminc.com>
2019-02-11 00:48:35 -05:00
Dan Ryan eae3958227 Fix pep508 direct URL depedencies
- Fixes #3148

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-01-27 02:06:40 -05:00
Dan Ryan 846b67f521 Update PEP 508 dependency parsing implementation
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-01-24 01:21:46 -05:00
Dan Ryan 39c3b3a50d Fix editable and local setup.py builds
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-01-23 12:40:45 -05:00
Dan Ryan 1601511d06 Don't depend on kenneth's personal mirror for testing
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-01-21 21:20:16 -05:00
Dan Ryan 4a8eeada96 Remove pyc from pyinstaller and grab final updates from pythonfinder
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-01-21 20:02:50 -05:00
Dan Ryan 574fe7308d Update all vendored dependencies
- Clean up test config and environment variable handling
- Unset env var changes performend by `pipenv run`
- Make `environments.is_in_virtualenv()` more dynamic -- read
  environment on the fly
- Split up tests on `pipenv run` to reduce complexity -- one test for
  global run (no virtualenv creation), one test for virtualenv creation
- Add `warn_in_virtualenv` call to `run` command, why doesn't click
  invoke this automatically?

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-01-21 19:05:25 -05:00
jxltom a873e7c2e3 Merge branch 'master' into activate-custom-virtualenv 2019-01-18 12:40:23 +08:00
Frost Ming 11b8d19c2f Merge branch 'master' into bugfix/3449 2019-01-18 11:32:39 +08:00
jxltom d17d46256c Merge branch 'master' into activate-custom-virtualenv 2019-01-18 09:05:43 +08:00
Adam Goldschmidt 3b4c592f30 add test to invalid prepare_pip_source_args and change error to be more descriptive. (+1 squashed commit)
Squashed commits:
[b00fb5ba] fixed test getting empty URL in source
2019-01-17 14:10:41 +02:00
Frost Ming 9dab05d64e Update the index names in lock file 2019-01-17 12:04:05 +08:00
Frost Ming ba9f5057b8 Populate source when getting lockfile 2019-01-09 10:07:26 +08:00
jxltom 16db36e60f Test for pipenv behavior in activated virtualenv 2018-12-16 20:36:32 +08:00
nonylene f81e86181c Add test for pipenv --python --site-packages 2018-12-09 05:17:25 +09:00
Frost Ming aadb24b9df Move to install test suite 2018-12-07 09:00:04 +08:00
Frost Ming 27f83a8631 preserve inline spaces in toml 2018-12-06 15:54:18 +08:00
Dan Ryan 2160b64005 Merge branch 'master' into bugfix/3324 2018-12-01 14:09:59 -05:00
Dan Ryan a500420f6c Merge branch 'master' into resort-imports 2018-12-01 13:06:25 -05:00
jxltom bea9e03165 Enable test disabled in travis 2018-12-01 22:17:00 +08:00
Frost Ming 360ed75992 try another package
Signed-off-by: Frost Ming <mianghong@gmail.com>
2018-12-01 20:56:47 +08:00
Frost Ming 7718350f2f Don't normalize name when writing Pipfile
Signed-off-by: Frost Ming <mianghong@gmail.com>
2018-12-01 19:44:10 +08:00
jxltom 85e64b86be Resort imports for tests 2018-12-01 17:26:32 +08:00
Tzu-ping Chung 6a93e6cf44 Quote arguments with carets for cmd.exe
Carets introduce a difficult situation since they are essentially
"lossy" when parses. Consider this in cmd.exe:

    > echo "foo^bar"
    "foo^bar"
    > echo foo^^bar
    foo^bar

The two commands produce different results, but are both parsed by the
shell as `foo^bar`, and there's essentially no sensible way to tell what
was actually passed in. This implementation assumes the quoted variation
(the first) since it is easier to implement, and arguably the more common
case.
2018-11-28 19:30:45 +08:00
Frost Ming 6873145116 Abort pipenv when pip install fails 2018-11-28 16:42:14 +08:00
Dan Ryan 1ed7ae9e68 Fix vcs locking, prefer pipfile entries once locked
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-11-24 19:28:50 -05:00
Dan Ryan a08a2da524 Don't give child deps of vcs deps auto-precedence
- Stop preferring resolution of VCS dependencies in all cases
- Resolve vcs dependencies together with non-vcs dependencies
- Clarify blocking and no-deps logic
- Add artifacts and tests
- Add vendoring task for artifacts
- Clean up release tasks
- Fixes #3296

Signed-off-by: Dan Ryan <dan@danryan.co>
2018-11-24 17:10:45 -05:00