Prevent multi-line descriptions for crashing putup#509
Conversation
… specially on updates when the user might have edited `setup.cfg` This issue is related to #506.
Pull Request Test Coverage Report for Build 5711034905264128
💛 - Coveralls |
|
Thanks. Nice solution. Makes me think if maybe we could one day completely go for ConfigUpdater as template systems for I added some comments to the code which I think makes it easier to understand what's going on. Feel free to merge @abravalheri. And thanks a lot again :-) |
|
Yes, that would make sense. Let's see if we have any news about PEP 621 and setuptools in the near future. If not, we might want to invest sometime on this... Thank you very much @FlorianWilhelm for the suggestions! I think they improve a lot the PR. |
Purpose
Users can decide to edit
setup.cfgand change the description field to be a multi-line string.This can break updates, because the current
setup.cfgtemplate depends on the fact it is a sinlge line (the INI/CFG syntax is broken otherwise).This issue is related to #506.
Approach
When rendering the template use just the first line of the description.
Then use ConfigUpdater to fix it, if necessary, with
set_values([ ... list of lines ...]).