micropython/mip/mip: Add an alias for codeberg repos.#1101
Open
agatti wants to merge 1 commit intomicropython:masterfrom
Open
micropython/mip/mip: Add an alias for codeberg repos.#1101agatti wants to merge 1 commit intomicropython:masterfrom
agatti wants to merge 1 commit intomicropython:masterfrom
Conversation
2454ec3 to
ae3629a
Compare
Contributor
Author
|
|
9e0452c to
85fabcd
Compare
This commit introduces an alias to access codeberg repos from within the mip embedded package manager. Right now packages hosted on codeberg could only be referenced by their full URL, unlike other packages hosted on either GitHub or GitLab. To make access those packages easier, now they can be referenced as "codeberg:org/repo" when used inside `mip.install`. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces an alias to access codeberg repos from within the mip embedded package manager.
Right now packages hosted on codeberg could only be referenced by their full URL, unlike other packages hosted on either GitHub or GitLab. To make access those packages easier, now they can be referenced as "codeberg:org/repo@branch".
This is the
micropython-libcounterpart of micropython/micropython#18989.Testing
The same package mentioned in the other repo's PR (https://codeberg.org/agatti/micropython-package-test) was installed successfully via
import mip; mip.install("$URL")on an ESP32C3.The ESP8266 is not able to access codeberg repos due to a SSL cipher incompatibility (see #400), but there isn't much that can be done for that right now.
Trade-offs and Alternatives
The same remarks about whether adding a new provider or not, mentioned in the micropython PR still apply.
A similar refactoring has been applied to the on-device python code - albeit with a few more aggressive size optimisations, having a final size impact of 48 bytes. Unfortunately codeberg having a different parameter order than the other hosts forces having some named parameters in the string template. A more approachable size reduction could be had by renaming
_HOSTSinto something shorter. Suggestions for the new name are welcome :)Generative AI
I did not use generative AI tools when creating this PR.