Skip to content

Commit

Permalink
Override requirements (at a given level) from a requirements file. In…
Browse files Browse the repository at this point in the history
… that case, instead of merging, we override
  • Loading branch information
moshez committed Apr 24, 2023
1 parent 497011d commit 7f4eb04
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/briefcase/config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import copy
import keyword
import pathlib
import re
import unicodedata
from types import SimpleNamespace
Expand Down Expand Up @@ -487,6 +488,14 @@ def merge_config(config, data):

if value:
config.setdefault(option, []).extend(value)
for prefix in ["", "test_"]:
try:
fname = data.pop(f"{prefix}requires_file")
except KeyError:
pass
else:
value = pathlib.Path(fname).read_text().splitlines()
config[f"{prefix}requires"] = value

config.update(data)

Expand Down

0 comments on commit 7f4eb04

Please sign in to comment.