beeware / briefcase

Tools to support converting a Python project into a standalone native application.
https://briefcase.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
2.48k stars 352 forks source link

RPM and PKG packages need license information #1829

Open MarieRoald opened 1 month ago

MarieRoald commented 1 month ago

Describe the bug

RPM and PKG packages include a short descriptor for the license, but after #1812 Briefcase will no longer know that (it either has a licence file or a licence text which may or may not be a short descriptor). Consequently, it is always set to "Unknown".

Prior to #1812 briefcase might have a way to know the license descriptor, but it is no guarantee that it matches the LICENSE file.

Steps to reproduce

  1. Build an RPM or PKG bundle
  2. Look at the spec file
  3. Observe that the "License" field is set to "Unknown"

Expected behavior

A short license descriptor is included in the RPM spec file and the PKGBUILD-file

Screenshots

No response

Environment

Any environment

Logs

No response

Additional context

No response

freakboy3742 commented 1 month ago

As a suggested fix: when the license configuration item is parsed, it should be parsed into a License object that has properties for the different forms that the license can take - the path on disk, the literal text of the license, a short descriptor of the license (in SPDX format, plus PyPA-compatible format). It should be possible to construct the License instance from any of the legal input types that PEP621 allows.