Skip to content

Commit d618cad

Browse files
authored
Fix editable installs, switch to devpi cache and improve logging (#3810)
Fix editable installs, switch to devpi cache and improve logging
2 parents 4c00352 + a2697f8 commit d618cad

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+2637
-945
lines changed

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
url = https://github.com/pinax/pinax.git
77
[submodule "tests/test_artifacts/git/requests"]
88
path = tests/test_artifacts/git/requests
9-
url = https://github.com/requests/requests.git
9+
url = https://github.com/kennethreitz/requests.git
1010
[submodule "tests/test_artifacts/git/six"]
1111
path = tests/test_artifacts/git/six
1212
url = https://github.com/benjaminp/six.git
@@ -24,7 +24,7 @@
2424
url = https://github.com/pallets/flask.git
2525
[submodule "tests/test_artifacts/git/requests-2.18.4"]
2626
path = tests/test_artifacts/git/requests-2.18.4
27-
url = https://github.com/requests/requests
27+
url = https://github.com/kennethreitz/requests
2828
[submodule "tests/pypi"]
2929
path = tests/pypi
3030
url = https://github.com/sarugaku/pipenv-test-artifacts.git

Makefile

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,50 @@
1+
get_venv_dir:=$(shell mktemp -d 2>/dev/null || mktemp -d -t 'tmpvenv')
2+
venv_dir := $(get_venv_dir)/pipenv_venv
3+
venv_file := $(CURDIR)/.test_venv
4+
get_venv_path =$(file < $(venv_file))
5+
16
format:
27
black pipenv/*.py
38
test:
49
docker-compose up
10+
11+
.PHONY: ramdisk
12+
ramdisk:
13+
sudo mkdir -p /mnt/ramdisk
14+
sudo mount -t tmpfs -o size=2g tmpfs /mnt/ramdisk
15+
sudo chown -R ${USER}:${USER} /mnt/ramdisk
16+
17+
.PHONY: ramdisk-virtualenv
18+
ramdisk-virtualenv: ramdisk
19+
[ ! -e "/mnt/ramdisk/.venv/bin/activate" ] && \
20+
python -m virtualenv /mnt/ramdisk/.venv
21+
@echo "/mnt/ramdisk/.venv" >> $(venv_file)
22+
23+
.PHONY: virtualenv
24+
virtualenv:
25+
[ ! -e $(venv_dir) ] && rm -rf $(venv_file) && python -m virtualenv $(venv_dir)
26+
@echo $(venv_dir) >> $(venv_file)
27+
28+
.PHONY: test-install
29+
test-install: virtualenv
30+
. $(get_venv_path)/bin/activate && \
31+
python -m pip install --upgrade pip virtualenv -e .[tests,dev] && \
32+
pipenv install --dev
33+
34+
.PHONY: submodules
35+
submodules:
36+
git submodule sync
37+
git submodule update --init --recursive
38+
39+
.PHONY: tests
40+
tests: virtualenv submodules test-install
41+
. $(get_venv_path)/bin/activate && \
42+
pipenv run pytest -ra -vvv --full-trace --tb=long
43+
44+
.PHONY: test-specific
45+
test-specific: submodules virtualenv test-install
46+
. $(get_venv_path)/bin/activate && pipenv run pytest -ra -k '$(tests)'
47+
48+
.PHONY: retest
49+
retest: virtualenv submodules test-install
50+
. $(get_venv_path)/bin/activate && pipenv run pytest -ra -k 'test_check_unused or test_install_editable_git_tag or test_get_vcs_refs or test_skip_requirements_when_pipfile or test_editable_vcs_install or test_basic_vcs_install or test_git_vcs_install or test_ssh_vcs_install or test_vcs_can_use_markers' -vvv --full-trace --tb=long

Pipfile.lock

Lines changed: 62 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

news/3809.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed several bugs which could prevent editable VCS dependencies from being installed into target environments, even when reporting successful installation.

news/3810.feature.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Improved verbose logging output during ``pipenv lock`` will now stream output to the console while maintaining a spinner.

pipenv/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@
3737
pass
3838

3939
from pipenv.vendor.vistir.misc import get_text_stream
40+
4041
stdout = get_text_stream("stdout")
4142
stderr = get_text_stream("stderr")
4243

4344
if os.name == "nt":
4445
from pipenv.vendor.vistir.misc import _can_use_color, _wrap_for_color
46+
4547
if _can_use_color(stdout):
4648
stdout = _wrap_for_color(stdout)
4749
if _can_use_color(stderr):

pipenv/cli/command.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
argument, echo, edit, group, option, pass_context, secho, version_option
99
)
1010

11-
import click_completion
12-
import crayons
13-
import delegator
11+
from ..vendor import click_completion
12+
from ..vendor import delegator
13+
from ..patched import crayons
1414

1515
from ..__version__ import __version__
1616
from .options import (

0 commit comments

Comments
 (0)