diff options
| -rw-r--r-- | setuptools/config.py | 6 | ||||
| -rw-r--r-- | setuptools/tests/test_config.py | 24 |
2 files changed, 27 insertions, 3 deletions
diff --git a/setuptools/config.py b/setuptools/config.py index 06a61d16..4d3eff93 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -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, } diff --git a/setuptools/tests/test_config.py b/setuptools/tests/test_config.py index dbabd69e..95ae60b2 100644 --- a/setuptools/tests/test_config.py +++ b/setuptools/tests/test_config.py @@ -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( |
