Commit 986ff42f authored by Sviatoslav Sydorenko's avatar Sviatoslav Sydorenko

Allow adding few files @ metadata.long_description

parent 60cfeeac
......@@ -245,8 +245,8 @@ class ConfigHandler(object):
directory with setup.py.
Examples:
include: LICENSE
include: src/file.txt
file: LICENSE
file: src/file.txt
:param str value:
:rtype: str
......@@ -408,7 +408,7 @@ class ConfigMetadataHandler(ConfigHandler):
'classifiers': self._get_parser_compound(parse_file, parse_list),
'license': parse_file,
'description': parse_file,
'long_description': parse_file,
'long_description': self._get_parser_compound(parse_list, lambda l: '\n'.join(map(parse_file, l))),
'version': self._parse_version,
}
......
......@@ -139,6 +139,30 @@ class TestMetadata:
assert metadata.download_url == 'http://test.test.com/test/'
assert metadata.maintainer_email == 'test@test.com'
def test_file_mixed(self, tmpdir):
fake_env(
tmpdir,
'[metadata]\n'
'long_description =\n'
' Some normal line\n'
' file: README.rst\n'
' Another line\n'
' file: CHANGES.rst\n'
'\n'
)
tmpdir.join('README.rst').write('readme contents\nline2')
tmpdir.join('CHANGES.rst').write('changelog contents\nand stuff')
with get_dist(tmpdir) as dist:
assert dist.metadata.long_description == (
'Some normal line\n'
'readme contents\nline2\n'
'Another line\n'
'changelog contents\nand stuff'
)
def test_file_sandboxed(self, tmpdir):
fake_env(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment