Skip to content

Commit e0160f2

Browse files
committed
Add multiple path support to includes-conditional and sources-conditional
1 parent 08e2c84 commit e0160f2

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

pythonbuild/cpython.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,10 @@ def derive_setup_local(
511511
)
512512

513513
if target_match and (python_min_match and python_max_match):
514-
line += f" {entry['source']}"
514+
if source := entry.get("source"):
515+
line += f" {source}"
516+
for source in entry.get("sources", []):
517+
line += f" {source}"
515518

516519
for define in info.get("defines", []):
517520
line += f" -D{define}"
@@ -549,7 +552,11 @@ def derive_setup_local(
549552
)
550553

551554
if target_match and (python_min_match and python_max_match):
552-
line += f" -I{entry['path']}"
555+
# TODO: Change to `include` and drop support for `path`
556+
if include := entry.get("path"):
557+
line += f" -I{include}"
558+
for include in entry.get("includes", []):
559+
line += f" -I{include}"
553560

554561
for path in info.get("includes-deps", []):
555562
# Includes are added to global search path.

0 commit comments

Comments
 (0)