Skip to content

Commit 2be567a

Browse files
committed
Merge: Fixes incomplete getattr statement (#3714)
2 parents ea531c1 + d51c100 commit 2be567a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

changelog.d/3713.misc.rst

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fixed incomplete ``getattr`` statement that caused problems when accessing
2+
undefined attribute.

setuptools/config/pyprojecttoml.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def read_configuration(
112112
# `ini2toml` backfills include_package_data=False when nothing is explicitly given,
113113
# therefore setting a default here is backwards compatible.
114114
orig_setuptools_table = setuptools_table.copy()
115-
if dist and getattr(dist, "include_package_data") is not None:
115+
if dist and getattr(dist, "include_package_data", None) is not None:
116116
setuptools_table.setdefault("include-package-data", dist.include_package_data)
117117
else:
118118
setuptools_table.setdefault("include-package-data", True)

0 commit comments

Comments
 (0)