Skip to content

Fixup broken CI #151

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Fixup broken CI #151

wants to merge 1 commit into from

Conversation

gene1wood
Copy link

Around the beginning of 2025, the ubuntu-latest runner image which this project uses, was changed from Ubuntu 22.04 to 24.04.

As a result, the python version which is used by this repo's GitHub actions changed from 3.10.12 to 3.12.3.

With this change to Python 3.12, PEP 668 was introduced. This new Python behavior is causing errors in the CI and pip is exiting non-zero

error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.

    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.

    See /usr/share/doc/python3.13/README.venv for more information.

This commit changes the CI to use virtualenvs to address this externally-managed-environment problem.

This also fixes up or updates CI by

  • Changing the build image from Ubuntu 20.04 to 24.04
  • Updating the list of Python versions tested to just the current supported Python versions
  • Updating the versions of the checkout and setup-python actions
  • Anchoring the install image to Ubuntu 24.04 (instead of latest) to prevent this type of thing in the future
  • Updating container OSes for install
    • CentOS Stream 8 to CentOS Stream 9 as Stream 8 is end of lifed
    • Ubuntu focatl to noble

Around the beginning of 2025, the `ubuntu-latest` runner image which [this project uses][1], [was changed from Ubuntu 22.04 to 24.04][2].

As a result, the python version which is used by this repo's GitHub actions changed from [3.10.12][3] to [3.12.3][4].

With this change to Python 3.12, [PEP 668][5] was introduced. This new Python behavior is causing errors in the CI and `pip` is exiting non-zero

```
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.

    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.

    See /usr/share/doc/python3.13/README.venv for more information.
```

This commit changes the CI to use virtualenvs to address this externally-managed-environment problem.

This also fixes up or updates CI by

* Changing the build image from Ubuntu 20.04 to 24.04
* Updating the list of Python versions tested to just the current supported Python versions
* Updating the versions of the `checkout` and `setup-python` actions
* Anchoring the install image to Ubuntu 24.04 (instead of `latest`) to prevent this type of thing in the future
* Updating container OSes for install
  * CentOS Stream 8 to CentOS Stream 9 as Stream 8 is end of lifed
  * Ubuntu focatl to noble

[1]: https://github.com/systemd/python-systemd/blob/903142423452c4dd18110b7f8a953dabb2031e49/.github/workflows/install.yml#L17
[2]: actions/runner-images#10636
[3]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#installed-software
[4]: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md#language-and-runtime
[5]: https://peps.python.org/pep-0668/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy