mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
setup.cfg: Document that description-file can contain more than one file
This commit is contained in:
parent
3605030c9b
commit
8474f2901b
3 changed files with 7 additions and 9 deletions
|
@ -163,21 +163,18 @@ class Config:
|
|||
"mutually exclusive")
|
||||
raise PackagingOptionError(msg)
|
||||
|
||||
if isinstance(value, list):
|
||||
filenames = value
|
||||
else:
|
||||
filenames = value.split()
|
||||
filenames = value.split()
|
||||
|
||||
# concatenate each files
|
||||
value = ''
|
||||
# concatenate all files
|
||||
value = []
|
||||
for filename in filenames:
|
||||
# will raise if file not found
|
||||
with open(filename) as description_file:
|
||||
value += description_file.read().strip() + '\n'
|
||||
value.append(description_file.read().strip())
|
||||
# add filename as a required file
|
||||
if filename not in metadata.requires_files:
|
||||
metadata.requires_files.append(filename)
|
||||
value = value.strip()
|
||||
value = '\n'.join(value).strip()
|
||||
key = 'description'
|
||||
|
||||
if metadata.is_metadata_field(key):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue