We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 566f294 commit 7b7971eCopy full SHA for 7b7971e
setuptools/config/_apply_pyprojecttoml.py
@@ -125,7 +125,7 @@ def _set_config(dist: "Distribution", field: str, value: Any):
125
setter(value)
126
elif hasattr(dist.metadata, field) or field in SETUPTOOLS_PATCHES:
127
setattr(dist.metadata, field, value)
128
- if hasattr(dist, field):
+ else:
129
setattr(dist, field, value)
130
131
@@ -212,12 +212,12 @@ def _dependencies(dist: "Distribution", val: list, _root_dir):
212
if getattr(dist, "install_requires", []):
213
msg = "`install_requires` overwritten in `pyproject.toml` (dependencies)"
214
SetuptoolsWarning.emit(msg)
215
- _set_config(dist, "install_requires", val)
+ dist.install_requires = val
216
217
218
def _optional_dependencies(dist: "Distribution", val: dict, _root_dir):
219
existing = getattr(dist, "extras_require", None) or {}
220
- _set_config(dist, "extras_require", {**existing, **val})
+ dist.extras_require = {**existing, **val}
221
222
223
def _unify_entry_points(project_table: dict):
0 commit comments