Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

images/bootstrap: Allow pip an external python installation #30695

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

ameukam
Copy link
Member

@ameukam ameukam commented Sep 12, 2023

Follow of:

the image failed to build with:

Step #1: ╰─> To install Python packages system-wide, try apt install
Step #1:     python3-xyz, where xyz is the package you are trying to
Step #1:     install.
Step #1:
Step #1:     If you wish to install a non-Debian-packaged Python package,
Step #1:     create a virtual environment using python3 -m venv path/to/venv.
Step #1:     Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
Step #1:     sure you have python3-full installed.
Step #1:
Step #1:     If you wish to install a non-Debian packaged Python application,
Step #1:     it may be easiest to use pipx install xyz, which will manage a
Step #1:     virtual environment for you. Make sure you have pipx installed.
Step #1:
Step #1:     See /usr/share/doc/python3.11/README.venv for more information.

Starting with bookworm, pip enforces PEP 668.

This is an attempt to ensure we don't break python packages installation.

Follow of:
  - kubernetes#30409

the image failed to build with:

```
Step #1: ╰─> To install Python packages system-wide, try apt install
Step #1:     python3-xyz, where xyz is the package you are trying to
Step #1:     install.
Step #1:
Step #1:     If you wish to install a non-Debian-packaged Python package,
Step #1:     create a virtual environment using python3 -m venv path/to/venv.
Step #1:     Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
Step #1:     sure you have python3-full installed.
Step #1:
Step #1:     If you wish to install a non-Debian packaged Python application,
Step #1:     it may be easiest to use pipx install xyz, which will manage a
Step #1:     virtual environment for you. Make sure you have pipx installed.
Step #1:
Step #1:     See /usr/share/doc/python3.11/README.venv for more information.
```

Starting with bookworm, pip enforces [PEP 668](https://peps.python.org/pep-0668/).

This is an attempt to ensure we don't break python packages
installation.

Signed-off-by: Arnaud Meukam <ameukam@gmail.com>
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 12, 2023
@k8s-ci-robot k8s-ci-robot added area/images sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels Sep 12, 2023
@ameukam
Copy link
Member Author

ameukam commented Sep 12, 2023

cc @listx @BenTheElder

@ameukam
Copy link
Member Author

ameukam commented Sep 12, 2023

/retest

@@ -51,7 +51,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
zip \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/* \
&& python3 -m pip install --no-cache-dir --upgrade pip setuptools wheel
&& python3 -m pip install --no-cache-dir --break-system-packages --upgrade pip setuptools wheel
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:this-is-fine:

Copy link
Member

@BenTheElder BenTheElder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve
🙈

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 12, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ameukam, BenTheElder

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ameukam
Copy link
Member Author

ameukam commented Sep 12, 2023

/test pull-test-infra-unit-test

@k8s-ci-robot k8s-ci-robot merged commit 95c3613 into kubernetes:master Sep 12, 2023
5 checks passed
@ameukam
Copy link
Member Author

ameukam commented Sep 13, 2023

@BenTheElder
Copy link
Member

Switching distros requires patching this.
KRTE handled this correctly, doesn't look like the right patches were made for bootstrap/kubekins

ameukam added a commit to ameukam/test-infra that referenced this pull request Sep 13, 2023
Follow-up of:
  - kubernetes#30695

Ensure docker installation on bookworm

Signed-off-by: Arnaud Meukam <ameukam@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/images cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants