This commit is contained in:
Chi Song 2020-10-19 18:48:51 +08:00
Родитель 447011b1e7
Коммит 4104d39827
2 изменённых файлов: 6 добавлений и 9 удалений

Просмотреть файл

@ -27,13 +27,13 @@ jobs:
- name: Install Poetry for Linux
if: runner.os == 'Linux'
run: |
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - --preview --version 1.1.0b4
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - --preview --version 1.1.3
echo "::add-path::$HOME/.poetry/bin"
- name: Install Poetry for Windows
if: runner.os == 'Windows'
run: |
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python - --preview --version 1.1.0b4
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python - --preview --version 1.1.3
echo "::add-path::$env:USERPROFILE\.poetry\bin"
- name: Install Python dependencies

Просмотреть файл

@ -32,28 +32,25 @@ appear in your `PATH` before the Windows version, or this error will appear:
### Install Poetry
This is a temporary workaround! The currently released version of Poetry
(1.0.10) cannot handle the `azure-identity` package, so we need to install the
preview version (1.1.0b4).
On Linux (or WSL):
```bash
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 - --preview --version 1.1.0b4
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 - --preview --version 1.1.3
source $HOME/.poetry/env
```
On Windows (in PowerShell):
```powershell
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python - --preview --version 1.1.0b4
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python - --preview --version 1.1.3
# the path can be added to system, so it applies to every terminal.
$env:PATH += ";$env:USERPROFILE\.poetry\bin"
```
If you already have Poetry installed, you can update it like:
```bash
poetry self update --preview 1.1.0b4
poetry self update 1.1.3
```
### Install Python packages