Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not override existing pyproject.toml keys during conversion #1898

Open
rmartin16 opened this issue Jul 7, 2024 · 1 comment
Open

Do not override existing pyproject.toml keys during conversion #1898

rmartin16 opened this issue Jul 7, 2024 · 1 comment
Labels
enhancement New features, or improvements to existing features.

Comments

@rmartin16
Copy link
Member

What is the problem or limitation you are having?

When an existing project is converted, keys should not be added to [tool.briefcase] when they already exist in [project]. For instance, if version is already specified in [project], do not add version = "0.0.1" to [tool.briefcase]. This should be considered for all PEP-621 pyproject.toml keys.

Describe the solution you'd like

Omit [tool.briefcase] keys from pyproject.toml that are already represented in [project].

Describe alternatives you've considered

Manually remove overriding keys from [tool.briefcase] post-conversion.

Additional context

No response

@rmartin16 rmartin16 added the enhancement New features, or improvements to existing features. label Jul 7, 2024
@freakboy3742
Copy link
Member

Conceptually a good idea; but could be difficult to implement; the mechanism we're using to append pyproject.toml is (AFAIR) concatenation, rather than parsing and processing, so removing duplicate keys requires some pre-processing or a formatting-sensitive parser.

It may be better to consider this part of a broader migration to PEP621 format, so that a version field in [tool.briefcase] is no longer required or preferred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features, or improvements to existing features.
Projects
None yet
Development

No branches or pull requests

2 participants