Skip to content

tools/mpremote: Automate building mpremote distribution wheel. #8404

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

Closed

Conversation

andrewleech
Copy link
Contributor

As part of my additions to mpremote in #8231 I found it difficult to package up an installation wheel of mpremote to test and share with others.

This PR uses what I believe it the new best practices in python packaging to hook the build system to do things like copy extra files into the package distribution (eg. pyboard.py) and build said wheel with Github Actions.

I've also added a development marker to the version number for master builds showing the number of commits since release, eg mpremote-0.2.0+1-py3-none-any.whl
On the git commit where the version number is set this marker will not be present.

@codecov-commenter
Copy link

Codecov Report

Merging #8404 (cc10aba) into master (ade2720) will decrease coverage by 0.13%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8404      +/-   ##
==========================================
- Coverage   98.40%   98.26%   -0.14%     
==========================================
  Files         153      154       +1     
  Lines       20189    20292     +103     
==========================================
+ Hits        19866    19939      +73     
- Misses        323      353      +30     
Impacted Files Coverage Δ
py/mpz.c 100.00% <0.00%> (ø)
py/repl.c 100.00% <0.00%> (ø)
py/modsys.c 100.00% <0.00%> (ø)
py/objmodule.c 100.00% <0.00%> (ø)
extmod/vfs_posix.c 91.35% <0.00%> (ø)
ports/unix/moduos.c 18.91% <0.00%> (ø)
py/runtime.c 99.71% <0.00%> (+<0.01%) ⬆️
py/objexcept.c 96.41% <0.00%> (+0.09%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ade2720...cc10aba. Read the comment docs.

@dpgeorge dpgeorge added the tools Relates to tools/ directory in source, or other tooling label Mar 17, 2022
dpgeorge pushed a commit to jimmo/micropython that referenced this pull request Feb 24, 2023
This allows the entire configuration to be defined in a single file,
including the logic for including pyboard.py and automatically versioning
based on the git tag.

Building the package works both via `python -m build` as well as
`hatch build`.  `python -m build ` has the advantage of automatically
fetching all dependencies, you don't need to manually install any hatch
packages.

In order to make the versioning work, and also keep things simpler for end
users, mpremote releases will now be the same as MicroPython releases and
use the same tag.  The version strings for mpremote will look like:
- X.Y.Z -- clean build at the tag
- X.Y.Z.postN+gHASH -- clean build, N revisions from the most recent tag
- X.Y.Z.postN+gHASH.dYYYYMMDD -- dirty build, N revisions from out

This commit extends on the idea from micropython#8404.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
@dpgeorge
Copy link
Member

Closed in favour of #10645.

@dpgeorge dpgeorge closed this Feb 24, 2023
karfas pushed a commit to karfas/micropython that referenced this pull request Apr 23, 2023
This allows the entire configuration to be defined in a single file,
including the logic for including pyboard.py and automatically versioning
based on the git tag.

Building the package works both via `python -m build` as well as
`hatch build`.  `python -m build ` has the advantage of automatically
fetching all dependencies, you don't need to manually install any hatch
packages.

In order to make the versioning work, and also keep things simpler for end
users, mpremote releases will now be the same as MicroPython releases and
use the same tag.  The version strings for mpremote will look like:
- X.Y.Z -- clean build at the tag
- X.Y.Z.postN+gHASH -- clean build, N revisions from the most recent tag
- X.Y.Z.postN+gHASH.dYYYYMMDD -- dirty build, N revisions from out

This commit extends on the idea from micropython#8404.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
alphonse82 pushed a commit to alphonse82/micropython-wch-ch32v307 that referenced this pull request May 8, 2023
This allows the entire configuration to be defined in a single file,
including the logic for including pyboard.py and automatically versioning
based on the git tag.

Building the package works both via `python -m build` as well as
`hatch build`.  `python -m build ` has the advantage of automatically
fetching all dependencies, you don't need to manually install any hatch
packages.

In order to make the versioning work, and also keep things simpler for end
users, mpremote releases will now be the same as MicroPython releases and
use the same tag.  The version strings for mpremote will look like:
- X.Y.Z -- clean build at the tag
- X.Y.Z.postN+gHASH -- clean build, N revisions from the most recent tag
- X.Y.Z.postN+gHASH.dYYYYMMDD -- dirty build, N revisions from out

This commit extends on the idea from micropython#8404.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
tannewt added a commit to tannewt/circuitpython that referenced this pull request Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Relates to tools/ directory in source, or other tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants