Skip to content

Commit

Permalink
ci: Install poetry-plugin-export for poetry export command
Browse files Browse the repository at this point in the history
Poetry will no longer include the `poetry-plugin-export` plugin by default, which is essential for exporting dependencies. So, we now need to install it explicitly.
  • Loading branch information
ShahanaFarooqui authored and cdecker committed Jan 9, 2025
1 parent 127ceb6 commit 740b712
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ jobs:
run: |
bash -x .github/scripts/setup.sh
pip install -U pip wheel poetry
poetry self add poetry-plugin-export
# Export and then use pip to install into the current env
poetry export -o /tmp/requirements.txt --without-hashes --with dev
pip install -r /tmp/requirements.txt
Expand Down Expand Up @@ -145,6 +146,7 @@ jobs:
run: |
set -e
pip3 install --user pip wheel poetry
poetry self add poetry-plugin-export
poetry export -o requirements.txt --with dev --without-hashes
python3 -m pip install -r requirements.txt
./configure --enable-debugbuild CC="$COMPILER" ${{ matrix.COPTFLAGS_VAR }}
Expand Down Expand Up @@ -193,6 +195,7 @@ jobs:
sudo apt-get update -qq
sudo apt-get install -y -qq lowdown
pip install -U pip wheel poetry
poetry self add poetry-plugin-export
# Export and then use pip to install into the current env
poetry export -o /tmp/requirements.txt --without-hashes --with dev
pip install -r /tmp/requirements.txt
Expand Down Expand Up @@ -227,6 +230,7 @@ jobs:
run: |
bash -x .github/scripts/setup.sh
pip install -U pip wheel poetry
poetry self add poetry-plugin-export
# Export and then use pip to install into the current env
poetry export -o /tmp/requirements.txt --without-hashes --with dev
pip install -r /tmp/requirements.txt
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ ENV PYTHON_VERSION=3
RUN curl -sSL https://install.python-poetry.org | python3 -
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1
RUN pip3 install --upgrade pip setuptools wheel
RUN poetry self add poetry-plugin-export

RUN wget -q https://zlib.net/fossils/zlib-1.2.13.tar.gz -O zlib.tar.gz && \
wget -q https://www.sqlite.org/2019/sqlite-src-3290000.zip -O sqlite.zip
Expand Down Expand Up @@ -198,6 +199,7 @@ RUN ( ! [ "${target_host}" = "arm-linux-gnueabihf" ] ) || \
# Ensure that the desired grpcio-tools & protobuf versions are installed
# https://github.com/ElementsProject/lightning/pull/7376#issuecomment-2161102381
RUN poetry lock --no-update && poetry install
RUN poetry self add poetry-plugin-export

# Ensure that git differences are removed before making bineries, to avoid `-modded` suffix
# poetry.lock changed due to pyln-client, pyln-proto and pyln-testing version updates
Expand Down
1 change: 1 addition & 0 deletions contrib/docker/Dockerfile.builder.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ ENV PATH=/opt/venv/bin:${PATH}
RUN python3 -m pip install pip wheel && \
python3 -m virtualenv /opt/venv && \
/opt/venv/bin/python3 -m pip install --force-reinstall -U pip poetry wheel
RUN poetry self add poetry-plugin-export
3 changes: 2 additions & 1 deletion contrib/reprobuild/Dockerfile.focal
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ RUN git clone https://github.com/pyenv/pyenv.git /root/.pyenv && \

RUN wget https://bootstrap.pypa.io/get-pip.py -O /tmp/get-pip.py && python3 /tmp/get-pip.py \
&& rm /tmp/get-pip.py \
&& pip install poetry mako grpcio-tools==1.62.2
&& pip install poetry mako grpcio-tools==1.62.2 && \
poetry self add poetry-plugin-export

RUN wget https://sh.rustup.rs -O rustup-install.sh && \
bash rustup-install.sh --default-toolchain none --quiet -y && \
Expand Down
3 changes: 2 additions & 1 deletion contrib/reprobuild/Dockerfile.jammy
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ RUN git clone https://github.com/pyenv/pyenv.git /root/.pyenv && \

RUN wget https://bootstrap.pypa.io/get-pip.py -O /tmp/get-pip.py && python3 /tmp/get-pip.py \
&& rm /tmp/get-pip.py \
&& pip install poetry mako grpcio-tools
&& pip install poetry mako grpcio-tools && \
poetry self add poetry-plugin-export

RUN wget https://sh.rustup.rs -O rustup-install.sh && \
bash rustup-install.sh --default-toolchain none --quiet -y && \
Expand Down
3 changes: 2 additions & 1 deletion contrib/reprobuild/Dockerfile.noble
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ RUN git clone https://github.com/pyenv/pyenv.git /root/.pyenv && \

RUN wget https://bootstrap.pypa.io/get-pip.py -O /tmp/get-pip.py && python3 /tmp/get-pip.py \
&& rm /tmp/get-pip.py \
&& pip install poetry mako grpcio-tools
&& pip install poetry mako grpcio-tools && \
poetry self add poetry-plugin-export

RUN wget https://sh.rustup.rs -O rustup-install.sh && \
bash rustup-install.sh --default-toolchain none --quiet -y && \
Expand Down

0 comments on commit 740b712

Please sign in to comment.