launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #27753
Re: [Merge] ~jugmac00/lpcraft:retrieve-version-info-directly-from-setup-cfg into lpcraft:main
Verified by building the Snap
```
Pulling lpcraft
+ snapcraftctl pull
++ sed -n '/^version = /s///p' /root/project/setup.cfg
+ snapcraftctl set-version 0.0.1
```
We use setup-cfg-format, so I do not expect parsing issues because of e.g. whitespace issues.
While this might not be 100% as reliable (let's try :-), it feels a bit odd to have custom code in the application, just to deliver meta data for an external builder (well, except for setuptools :-))
Also, it would feel especially odd to mock/patch importlib to test this code path. If the suggested solution is not accepted, splitting the code for parsing the version for snap in a separate function seems to be fine, too.
--
https://code.launchpad.net/~jugmac00/lpcraft/+git/lpcraft/+merge/412148
Your team Launchpad code reviewers is requested to review the proposed merge of ~jugmac00/lpcraft:retrieve-version-info-directly-from-setup-cfg into lpcraft:main.
References