Accept all content types for README files already in code#176
Conversation
|
jenkins failures |
1833401 to
d5629a4
Compare
7039519 to
410c9cc
Compare
|
I'll try once more to get this merged. It is now synced with |
|
@lexming weird it doesn't fail locally then. |
|
@stdweird I finally updated this PR and it passes the tests now! 🍾 Sorry for the long delay on this. |
| # test with minimal target | ||
| vsc_setup.build_setup_cfg_for_bdist_rpm({}) | ||
| target = { | ||
| 'description_file': 'README.md', |
There was a problem hiding this comment.
why do you need to set this. it's the default value right?
There was a problem hiding this comment.
This is only needed in this unit test with an artificial target. In a real scenario the description_file attribute will be set by the call to locate_readme() in action_target(), which looks for the actual README file in the repo directory. The only case where a target would have no description_file is if there is no README, which will error out before reaching build_setup_cfg_for_bdist_rpm().
|
|
||
| # realistic target | ||
| target = { | ||
| 'description_file': 'README.md', |
There was a problem hiding this comment.
not sure why this is needed? we're not going to change all the setup.py to add the old default...
There was a problem hiding this comment.
No need to change any existing setup.py, as explained in my previous comment, this is only needed for this artificial target. From now on all targets will be generated with a description_file attribute pointing to the actual README file in the repo.
There is already code in
vsc-installchecking for those README file formats recommended by pypi. However, currently the only allowed README file isREADME.md. This PR takes the existing list inreadme_content_typesand uses it to check for existing README files as well (by order of preference).The list of allowed README files becomes:
README.md,README.rst,README.txt,README