beeware / beeware/briefcase

Allow duplicated package names in `sources` list

Open
#975 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
3.3k
Forks
549
Avg merge
1d 4h
Merged PRs (30d)
40

Description

If any of the `sources` lists contain directories with the same basenames, Briefcase gives an error like this:
```
The `sources` list for 'toga-test' contains duplicated package names.
```

However, there are legitimate reasons for wanting to merge together multiple directories into a single package. There's even a [PEP about it](https://peps.python.org/pep-0420/). ~~And it would make the Toga test code organization a bit simpler if both the common code and the backend-specific code were in the same `tests` package.~~ (see below)

The [Briefcase documentation](https://briefcase.readthedocs.io/en/latest/reference/configuration.html#sources) already indicates how this would work:
> If an application defines sources at the global level, application level, and platform level, the final set of sources will be the concatenation of sources from all levels, starting from least to most specific.

However, "concatenation" is a bit vague, so this should be clarified.

Contributor guide

Open the contributing guide

Research direction

Begin by locating the sources-list validation that emits the duplicated package names error, then read the configuration reference's sources section linked in the issue. Confirm how concatenated source directories are handled, allow legitimate duplicate basenames, and clarify the documentation so the resulting behavior is explicit.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.