Closed 2bndy5 closed 1 year ago
The current release process sidesteps requiring this package to do so by using sed
in the release workflow.
Yes, that works when building the bundles, but the __version__
attr remains 0.0.0-auto.0
when building dists for pypi (even with setuptools_scm
).
The workflow now looks for 0.0.0+auto.0
and changes it before building wheels and uploading them and the source distribution. Anywhere that uses 0.0.0-auto.0
should be changed to 0.0.0+auto.0
and use the new release workflows, and it should modify and upload them to PyPI appropriately.
Oh I see. This issue still stands if not using adafruit CI actions, but I guess we can call it solved since this is the only feedback for nearly 5 months.
I'm trying to figure out how to get setuptools_scm to save the version number in a generate file (named _version.py) when building the wheel for PyPI while still being compliant with this pkg when generating bundles. However, the
__version__
value is not getting replaced when I useIt is possible that I'm overthinking this (see additional context below). As I currently see it, my limitation is here: https://github.com/adafruit/circuitpython-build-tools/blob/687af8c22b41b17f2e25d2389f495f7a9b8f454c/circuitpython_build_tools/build.py#L141-L143
I think a
lstrip()
would fix my predicament:I added a little regex to reduce the somewhat duplicated code.
Additional CI context
If I build the wheel and bundles in the same CI job, then I risk bundling the generated _version.py (which seems unnecessary for CircuitPython's small file storage capacity).
If I don't generate the _version.py file then the following code resolves differently depending on the platform: