diff options
author | Satoru SATOH <satoru.satoh@gmail.com> | 2018-10-24 03:42:01 +0900 |
---|---|---|
committer | Paul Ganssle <paul@ganssle.io> | 2018-10-24 12:10:20 -0400 |
commit | 74afc688fc4084390c9e9169984b5f7d8339b8e4 (patch) | |
tree | e9aab17c86c89e8b4c45a3696a79e727be98218a /setuptools/config.py | |
parent | 5b90a0d9d97f52fc91792a8143670ee1a73f51c5 (diff) | |
download | external_python_setuptools-74afc688fc4084390c9e9169984b5f7d8339b8e4.tar.gz external_python_setuptools-74afc688fc4084390c9e9169984b5f7d8339b8e4.tar.bz2 external_python_setuptools-74afc688fc4084390c9e9169984b5f7d8339b8e4.zip |
Add data_files support in setup.cfg with test case
In the test case, dist.data_files needs to be sorted because the
current implementation loads the configuration files as a dictionary
with arbitrary order on Python < 3.6.
Diffstat (limited to 'setuptools/config.py')
-rw-r--r-- | setuptools/config.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/setuptools/config.py b/setuptools/config.py index 0da3dbc9..73a3bf70 100644 --- a/setuptools/config.py +++ b/setuptools/config.py @@ -598,3 +598,11 @@ class ConfigOptionsHandler(ConfigHandler): parse_list = partial(self._parse_list, separator=';') self['extras_require'] = self._parse_section_to_dict( section_options, parse_list) + + def parse_section_data_files(self, section_options): + """Parses `data_files` configuration file section. + + :param dict section_options: + """ + parsed = self._parse_section_to_dict(section_options, self._parse_list) + self['data_files'] = [(k, v) for k, v in parsed.items()] |