diff options
| author | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2023-01-20 17:43:35 +0000 |
|---|---|---|
| committer | Anderson Bravalheri <andersonbravalheri@gmail.com> | 2023-01-20 17:43:35 +0000 |
| commit | 68d7376600b0d1e607bcba74f91a599e790df4c6 (patch) | |
| tree | 95a084ae5b7913b69208c07fd1d4e1f5fa009252 /setuptools | |
| parent | 7d35a3869d8cb834a42b65ab9911f0bdb3781a48 (diff) | |
| download | python-setuptools-git-68d7376600b0d1e607bcba74f91a599e790df4c6.tar.gz | |
Account for file directive with string in pyproject.toml
Diffstat (limited to 'setuptools')
| -rw-r--r-- | setuptools/config/pyprojecttoml.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/setuptools/config/pyprojecttoml.py b/setuptools/config/pyprojecttoml.py index cedf5675..c305bad0 100644 --- a/setuptools/config/pyprojecttoml.py +++ b/setuptools/config/pyprojecttoml.py @@ -11,6 +11,7 @@ from functools import partial from typing import TYPE_CHECKING, Callable, Dict, Optional, Mapping, Set, Union from setuptools.errors import FileError, OptionError +from setuptools.extern.more_itertools import always_iterable from . import expand as _expand from ._apply_pyprojecttoml import apply as _apply @@ -312,8 +313,9 @@ class _ConfigExpander: with _ignore_errors(self.ignore_option_errors): root_dir = self.root_dir if "file" in directive: - self._referenced_files.update(directive["file"]) - return _expand.read_files(directive["file"], root_dir) + files = always_iterable(directive["file"]) + self._referenced_files.update(files) + return _expand.read_files(files, root_dir) if "attr" in directive: return _expand.read_attr(directive["attr"], package_dir, root_dir) raise ValueError(f"invalid `{specifier}`: {directive!r}") |
