diff --git a/README.md b/README.md index a8f251db..f22c6776 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,10 @@ Or, if you\'re using FreeBSD: # pkg install py36-pipenv +When none of the above is an option: + + $ pip install pipenv + Otherwise, refer to the [documentation](https://pipenv.pypa.io/en/latest/#install-pipenv-today) for instructions. ✨🍰✨ diff --git a/news/4199.behavior.rst b/news/4199.behavior.rst new file mode 100644 index 00000000..eb1dae3c --- /dev/null +++ b/news/4199.behavior.rst @@ -0,0 +1 @@ +Make sure `pipenv lock -r --pypi-mirror {MIRROR_URL}` will respect the pypi-mirror in requirements output. diff --git a/pipenv/core.py b/pipenv/core.py index e71ec5d8..ec2a9b80 100644 --- a/pipenv/core.py +++ b/pipenv/core.py @@ -796,7 +796,7 @@ def do_install_dependencies( skip_lock=False, concurrent=True, requirements_dir=None, - pypi_mirror=False, + pypi_mirror=None, ): """" Executes the install functionality. @@ -830,7 +830,7 @@ def do_install_dependencies( no_deps = not skip_lock # skip_lock true, no_deps False, pip resolves deps deps_list = list(lockfile.get_requirements(dev=dev, only=requirements)) if requirements: - index_args = prepare_pip_source_args(project.sources) + index_args = prepare_pip_source_args(get_source_list(pypi_mirror=pypi_mirror, project=project)) index_args = " ".join(index_args).replace(" -", "\n-") deps = [ req.as_line(sources=False, include_hashes=False) for req in deps_list diff --git a/pipenv/environments.py b/pipenv/environments.py index 79f66019..848fec87 100644 --- a/pipenv/environments.py +++ b/pipenv/environments.py @@ -247,7 +247,11 @@ PIP_EXISTS_ACTION = os.environ.get("PIP_EXISTS_ACTION", "w") Defaullts to (w)ipe """ -PIPENV_RESOLVE_VCS = _is_env_truthy(os.environ.get("PIPENV_RESOLVE_VCS", 'true')) +PIPENV_RESOLVE_VCS = ( + os.environ.get("PIPENV_RESOLVE_VCS") is None + or _is_env_truthy("PIPENV_RESOLVE_VCS") +) + """Tells Pipenv whether to resolve all VCS dependencies in full. As of Pipenv 2018.11.26, only editable VCS dependencies were resolved in full. diff --git a/tests/integration/test_lock.py b/tests/integration/test_lock.py index 7b81e0be..4f202bea 100644 --- a/tests/integration/test_lock.py +++ b/tests/integration/test_lock.py @@ -379,10 +379,8 @@ fake-package = "*" assert c.return_code == 0 c = p.pipenv('lock -r --pypi-mirror {0}'.format(mirror_url)) assert c.return_code == 0 - assert '-i https://pypi.org/simple' in c.out.strip() + assert '-i {0}'.format(mirror_url) in c.out.strip() assert '--extra-index-url https://test.pypi.org/simple' in c.out.strip() - # Mirror url should not have replaced source URLs - assert '-i {0}'.format(mirror_url) not in c.out.strip() assert '--extra-index-url {}'.format(mirror_url) not in c.out.strip()