Skip to content

Commit

Permalink
Re-install pip inside the venv
Browse files Browse the repository at this point in the history
  • Loading branch information
frostming committed Nov 4, 2021
1 parent 5daea2b commit fee04e5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ is [pyflow], but it is written with Rust and thus can't get much help from the b

PDM requires python version 3.7 or higher.

### Via Install Script

Like Pip, PDM provides an installation script that will install PDM into an isolated environment.

**For Linux/Mac**
Expand Down Expand Up @@ -108,7 +110,7 @@ optional arguments:

You can either pass the options after the script or set the env var value.

## Alternative Installation Methods
### Alternative Installation Methods

If you are on MacOS and using `homebrew`, install it by:

Expand Down
6 changes: 4 additions & 2 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ foo

PDM 需要 Python 3.7 或更高版本。

### 通过安装脚本

像 pip 一样,PDM 也提供了一键安装脚本,用来将 PDM 安装在一个隔离的环境中。

**Linux/Mac 安装命令**
Expand Down Expand Up @@ -104,15 +106,15 @@ optional arguments:

你既可以通过直接增加选项,也可以通过设置对应的环境变量来达到这一效果。

## 其他安装方法
### 其他安装方法

如果你使用的是 MacOS 并且安装了 `homebrew`

```bash
$ brew install pdm
```

如果你在Windows上使用 [Scoop](https://scoop.sh/), 运行以下命令安装:
如果你在 Windows 上使用 [Scoop](https://scoop.sh/), 运行以下命令安装:

```
PS> scoop bucket add frostming https://github.com/frostming/scoop-frostming.git
Expand Down
4 changes: 4 additions & 0 deletions install-pdm.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ def _install(self, venv_path: Path) -> None:
else:
venv_python = venv_path / "bin/python"

# Re-install the venv pip to ensure it's not DEBUNDLED
# See issue/685
_call_subprocess([str(venv_python), "-m", "pip", "install", "-IU", "pip"])

if self.version:
if self.version.upper() == "HEAD":
req = f"git+{REPO}.git@main#egg=pdm"
Expand Down
1 change: 1 addition & 0 deletions news/685.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix the install script to ensure `pip` is not DEBUNDLED.

0 comments on commit fee04e5

Please sign in to comment.