Skip to content

feat: Replace ppa/deadsnakes with uv#5

Merged
peterdragun merged 2 commits intomasterfrom
feat/use_pyenv
Oct 13, 2025
Merged

feat: Replace ppa/deadsnakes with uv#5
peterdragun merged 2 commits intomasterfrom
feat/use_pyenv

Conversation

@peterdragun
Copy link
Copy Markdown
Collaborator

@peterdragun peterdragun commented Oct 6, 2025

Description

Deadsnake repository stopped supporting Ubuntu 20.04 (see deadsnakes/issues#251), which is required because of the GLIBC version (see espressif/esptool#1100). So this MR is fixing the issue with building the esptool by replacing the deadsnakes with uv. I have also replaced all pip calls with uv, which seems to speed up the process quite a bit.

I have also noticed that sometimes during apt-get update -y there is an interactive prompt for time zone info - I have disabled this by setting the noninteractive mode and timezone to UTC.

Failed job: https://github.com/espressif/esptool/actions/runs/18274789103/job/52027147066
Tested in: https://github.com/peterdragun/esptool/actions/runs/18279077745

Related

No related issues


Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

@peterdragun peterdragun requested a review from Copilot October 6, 2025 11:36
@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 6, 2025

Messages
📖 🎉 Good Job! All checks are passing!

👋 Hello peterdragun, we appreciate your contribution to this project!


📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more.

Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests via this public GitHub repository.

This GitHub project is public mirror of our internal git repository

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved, we synchronize it into our internal git repository.
4. In the internal git repository we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
5. If the change is approved and passes the tests it is merged into the default branch.
5. On next sync from the internal git repository merged change will appear in this public GitHub repository.

Generated by 🚫 dangerJS against 1496ebe

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses the issue where the deadsnakes PPA repository no longer supports Ubuntu 20.04 (required for GLIBC compatibility) by replacing it with pyenv for Python installation. The change ensures continued compatibility with the required Ubuntu version while maintaining the same functionality.

Key changes:

  • Replace deadsnakes PPA with pyenv for Python installation
  • Add environment variables to prevent interactive prompts during apt-get operations
  • Update Python executable references from versioned to generic python command

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Copy Markdown
Collaborator

@dobairoland dobairoland left a comment

Choose a reason for hiding this comment

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

LGTM with one suggestion. uv replaces many tools and is much faster. I think projects like this offer a good chance to experiment with such tools.

This can be merged as is.

Copy link
Copy Markdown
Member

@radimkarnis radimkarnis left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@peterdragun peterdragun force-pushed the feat/use_pyenv branch 3 times, most recently from 05b818d to 55b5203 Compare October 7, 2025 12:50
@peterdragun peterdragun force-pushed the feat/use_pyenv branch 7 times, most recently from 96336fe to cd4ce7d Compare October 10, 2025 12:54
@peterdragun peterdragun marked this pull request as draft October 10, 2025 12:54
@peterdragun peterdragun force-pushed the feat/use_pyenv branch 4 times, most recently from 9fe399c to bdad7df Compare October 10, 2025 13:23
@peterdragun peterdragun changed the title feat: Replace ppa/deadsnakes with pyenv feat: Replace ppa/deadsnakes with uv Oct 10, 2025
@peterdragun peterdragun marked this pull request as ready for review October 10, 2025 14:01
@peterdragun
Copy link
Copy Markdown
Collaborator Author

peterdragun commented Oct 10, 2025

Hi @dobairoland thank you for the recommendation to use uv, seems much better than pyenv in terms of performance. We got to roughly the same performance as before! I have updated the code to use the uv everywhere (it took me a couple of iterations to make it work 😅, but I think it was worth it!). Test results have also been updated. Please take a look.

BTW, should I also bump the default Python version to 3.14? What do you think?

Copy link
Copy Markdown
Collaborator

@dobairoland dobairoland left a comment

Choose a reason for hiding this comment

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

LGTM.

BTW, should I also bump the default Python version to 3.14? What do you think?

I think can we can wait with that for the next time when there will already be some bugfix releases for it.

@peterdragun peterdragun force-pushed the feat/use_pyenv branch 2 times, most recently from 5e5b074 to eea7e33 Compare October 13, 2025 08:42
Copy link
Copy Markdown
Member

@radimkarnis radimkarnis left a comment

Choose a reason for hiding this comment

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

uv solution LGTM as well.

@peterdragun peterdragun merged commit 8f20755 into master Oct 13, 2025
2 checks passed
@peterdragun peterdragun deleted the feat/use_pyenv branch October 13, 2025 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants