Skip to content

Commit

Permalink
Merge: Fixes incomplete getattr statement (#3714)
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed Jan 11, 2023
2 parents ea531c1 + d51c100 commit 2be567a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelog.d/3713.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fixed incomplete ``getattr`` statement that caused problems when accessing
undefined attribute.
2 changes: 1 addition & 1 deletion setuptools/config/pyprojecttoml.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def read_configuration(
# `ini2toml` backfills include_package_data=False when nothing is explicitly given,
# therefore setting a default here is backwards compatible.
orig_setuptools_table = setuptools_table.copy()
if dist and getattr(dist, "include_package_data") is not None:
if dist and getattr(dist, "include_package_data", None) is not None:
setuptools_table.setdefault("include-package-data", dist.include_package_data)
else:
setuptools_table.setdefault("include-package-data", True)
Expand Down

0 comments on commit 2be567a

Please sign in to comment.