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

Use micropython-uncrustify from pypi instead of apt package #9295

Merged
merged 2 commits into from
Jun 3, 2024

Conversation

dhalbert
Copy link
Collaborator

@dhalbert dhalbert commented Jun 2, 2024

MicroPython depends on a particular version of uncrustify to format its C code. This version is available from https://launchpad.net/~pybricks/+archive/ubuntu/ppa, but not for Ubuntu 24.04. A .deb from a previous version could be installed, but that's not necessarily a long-term solution. (The long-term solution is to update to a newer version of uncrustify.)

See https://github.com/orgs/micropython/discussions/14496 for background.

The maintainer of that PPA has now created a PyPi package for that version of uncrustify: https://pypi.org/project/micropython-uncrustify/. The repo for that is here: https://github.com/dlech/micropython-uncrustify.

This PR switches to installing that uncrustify by putting it in requirements-dev.txt.

If and when MicroPython switches to a newer uncrustify, we can undo this.

@dhalbert
Copy link
Collaborator Author

dhalbert commented Jun 2, 2024

I'm mystified why builds were working before without the setuptools in requirements-dev.txt. But adding that fixes a problem with the silabs builds.

@dhalbert dhalbert requested review from tannewt and jepler June 2, 2024 23:14
Copy link
Member

@jepler jepler left a comment

Choose a reason for hiding this comment

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

Makes sense. Do docs or learn need to be updated too?

@dhalbert dhalbert merged commit 8db7a85 into adafruit:main Jun 3, 2024
514 checks passed
@dhalbert dhalbert deleted the pypi-uncrustify branch June 3, 2024 15:33
@dhalbert
Copy link
Collaborator Author

dhalbert commented Jun 3, 2024

Do docs or learn need to be updated too?

Worth checking. I looked, and not that I can see. uncrustify is only used in this repo.

@jepler
Copy link
Member

jepler commented Jun 3, 2024

it was specifically https://learn.adafruit.com/building-circuitpython/linux#install-build-tools-on-ubuntu-2986713 that I wondered about, but you must have updated it already. thanks!

@jepler
Copy link
Member

jepler commented Jun 3, 2024

there may be a couple of references left in the source tree to the apt/dpkg-based installation method:

origin/main:.devcontainer/common_tools.sh:sudo apt-get -y install uncrustify mtools
origin/main:ports/silabs/README.md:    sudo apt install default-jre gcc-arm-none-eabi wget python3 python3-pip git git-lfs gettext uncrustify

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.

2 participants