diff options
Diffstat (limited to 'setuptools/config/pyprojecttoml.py')
| -rw-r--r-- | setuptools/config/pyprojecttoml.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/setuptools/config/pyprojecttoml.py b/setuptools/config/pyprojecttoml.py index 0ee1b8f9..e20d71d2 100644 --- a/setuptools/config/pyprojecttoml.py +++ b/setuptools/config/pyprojecttoml.py @@ -282,11 +282,12 @@ class _ConfigExpander: ) # `None` indicates there is nothing in `tool.setuptools.dynamic` but the value # might have already been set by setup.py/extensions, so avoid overwriting. - self.project_cfg.update({k: v for k, v in obtained_dynamic.items() if v}) + updates = {k: v for k, v in obtained_dynamic.items() if v is not None} + self.project_cfg.update(updates) def _ensure_previously_set(self, dist: "Distribution", field: str): previous = _PREVIOUSLY_DEFINED[field](dist) - if not previous and not self.ignore_option_errors: + if previous is None and not self.ignore_option_errors: msg = ( f"No configuration found for dynamic {field!r}.\n" "Some dynamic fields need to be specified via `tool.setuptools.dynamic`" |
