-
Notifications
You must be signed in to change notification settings - Fork 27
Accept all content types for README files already in code #176
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
base: master
Are you sure you want to change the base?
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. |
@@ -313,7 +313,10 @@ def read_setup_cfg(): | |||
os.chdir(self.tmpdir) | |||
|
|||
# test with minimal target | |||
vsc_setup.build_setup_cfg_for_bdist_rpm({}) | |||
target = { | |||
'description_file': 'README.md', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need to set this. it's the default value right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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()
.
@@ -325,6 +328,7 @@ def read_setup_cfg(): | |||
|
|||
# realistic target | |||
target = { | |||
'description_file': 'README.md', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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-install
checking 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_types
and 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