From 85c9d5eca45f6c34358b839507a229827bd3f6f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Mon, 6 Jan 2025 13:02:52 +0100 Subject: [PATCH] build: add poetry-plugin-export to the dependencies Since Poetry 2.0.0, the `export` command has been removed and it's advised to use the "poetry-plugin-export" package instead. This commit adds this dependency to the different places it's needed (debian environments, CI, build instructions, etc). --- .github/workflows/scan.yml | 5 ++++- BUILD.md | 6 ++++-- dev_scripts/env.py | 1 + dev_scripts/qa.py | 6 ++++-- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/scan.yml b/.github/workflows/scan.yml index 7607f1d..91ac56b 100644 --- a/.github/workflows/scan.yml +++ b/.github/workflows/scan.yml @@ -14,7 +14,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Install container build dependencies - run: sudo apt install pipx && pipx install poetry + run: | + sudo apt install pipx + pipx install poetry + pipx inject poetry poetry-plugin-export - name: Build container image run: python3 ./install/common/build-image.py --runtime docker --no-save # NOTE: Scan first without failing, else we won't be able to read the scan diff --git a/BUILD.md b/BUILD.md index c395f50..ff812c4 100644 --- a/BUILD.md +++ b/BUILD.md @@ -70,6 +70,7 @@ methods](https://python-poetry.org/docs/#installation))_ ```sh pipx ensurepath pipx install poetry +pipx inject poetry poetry-plugin-export ``` After this, restart the terminal window, for the `poetry` command to be in your @@ -157,6 +158,7 @@ Install Poetry using `pipx`: ```sh pipx install poetry +pipx inject poetry poetry-plugin-export ``` Clone this repository: @@ -372,7 +374,7 @@ cd dangerzone Install Python dependencies: ```sh -python3 -m pip install poetry +python3 -m pip install poetry poetry-plugin-export poetry install ``` @@ -433,7 +435,7 @@ Install Microsoft Visual C++ 14.0 or greater. Get it with ["Microsoft C++ Build Install [poetry](https://python-poetry.org/). Open PowerShell, and run: ``` -python -m pip install poetry +python -m pip install poetry poetry-plugin-export ``` Install git from [here](https://git-scm.com/download/win), open a Windows terminal (`cmd.exe`) and clone this repository: diff --git a/dev_scripts/env.py b/dev_scripts/env.py index 8fb2a8e..654da86 100755 --- a/dev_scripts/env.py +++ b/dev_scripts/env.py @@ -220,6 +220,7 @@ COPY storage.conf /home/user/.config/containers # FIXME: pipx install poetry does not work for Ubuntu Focal. ENV PATH="$PATH:/home/user/.local/bin" RUN pipx install poetry +RUN pipx inject poetry poetry-plugin-export COPY pyproject.toml poetry.lock /home/user/dangerzone/ RUN cd /home/user/dangerzone && poetry --no-ansi install diff --git a/dev_scripts/qa.py b/dev_scripts/qa.py index 8bc95b7..b47b230 100755 --- a/dev_scripts/qa.py +++ b/dev_scripts/qa.py @@ -262,6 +262,7 @@ methods](https://python-poetry.org/docs/#installation))_ ```sh pipx ensurepath pipx install poetry +pipx inject poetry poetry-plugin-export ``` After this, restart the terminal window, for the `poetry` command to be in your @@ -350,6 +351,7 @@ Install Poetry using `pipx`: ```sh pipx install poetry +pipx inject poetry poetry-plugin-export ``` Clone this repository: @@ -415,7 +417,7 @@ Install Microsoft Visual C++ 14.0 or greater. Get it with ["Microsoft C++ Build Install [poetry](https://python-poetry.org/). Open PowerShell, and run: ``` -python -m pip install poetry +python -m pip install poetry poetry-plugin-export ``` Install git from [here](https://git-scm.com/download/win), open a Windows terminal (`cmd.exe`) and clone this repository: @@ -816,7 +818,7 @@ class QAWindows(QABase): ) def install_poetry(self): self.run("python", "-m", "pip", "install", "poetry") - self.run("poetry", "install") + self.run("poetry", "install", "--sync") @QABase.task("Build Dangerzone container image", ref=REF_BUILD, auto=True) def build_image(self):