-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'vendoring-update' of github.com:pypa/pipenv into vendor…
…ing-update
- Loading branch information
Showing
10 changed files
with
96 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Environment variables are expanded correctly before running scripts on POSIX. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Correctly detect the virtualenv location inside an activated virtualenv. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fixed a bug that editable pacakges can't be uninstalled correctly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,8 @@ | |
import pytest | ||
|
||
from pipenv._compat import TemporaryDirectory, Path | ||
from pipenv.exceptions import VirtualenvActivationException | ||
from pipenv.utils import temp_environ | ||
from pipenv.vendor import delegator | ||
from pipenv.vendor import requests | ||
from pipenv.vendor import toml | ||
|
@@ -112,6 +114,9 @@ def isolate(pathlib_tmpdir): | |
os.environ["GIT_AUTHOR_EMAIL"] = fs_str("[email protected]") | ||
mkdir_p(os.path.join(home_dir, ".virtualenvs")) | ||
os.environ["WORKON_HOME"] = fs_str(os.path.join(home_dir, ".virtualenvs")) | ||
# Ignore PIPENV_ACTIVE so that it works as under a bare environment. | ||
os.environ.pop("PIPENV_ACTIVE", None) | ||
os.environ.pop("VIRTUAL_ENV", None) | ||
global WE_HAVE_GITHUB_SSH_KEYS | ||
WE_HAVE_GITHUB_SSH_KEYS = check_github_ssh() | ||
|
||
|
@@ -279,3 +284,22 @@ def finalize(): | |
@pytest.fixture() | ||
def testsroot(): | ||
return TESTS_ROOT | ||
|
||
|
||
@pytest.fixture() | ||
def virtualenv(pathlib_tmpdir): | ||
virtualenv_path = pathlib_tmpdir / "venv" | ||
with temp_environ(): | ||
c = delegator.run("virtualenv {}".format(virtualenv_path), block=True) | ||
assert c.return_code == 0 | ||
for name in ("bin", "Scripts"): | ||
activate_this = virtualenv_path / name / "activate_this.py" | ||
if activate_this.exists(): | ||
with open(str(activate_this)) as f: | ||
code = compile(f.read(), str(activate_this), "exec") | ||
exec(code, dict(__file__=str(activate_this))) | ||
break | ||
else: | ||
raise VirtualenvActivationException("Can't find the activate_this.py script.") | ||
os.environ["VIRTUAL_ENV"] = str(virtualenv_path) | ||
yield virtualenv_path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters