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

Allow license to be listed in the dynamic section #270

Open
tristan957 opened this issue Jan 23, 2023 · 16 comments
Open

Allow license to be listed in the dynamic section #270

tristan957 opened this issue Jan 23, 2023 · 16 comments
Labels
blocked enhancement New feature or request

Comments

@tristan957
Copy link

Meson already has project(license:). Would it be possible to autodetect it dynamically? For instace, I have 'Apache-2.0 OR MIT' as the value in project(). I would like this to populate the license = { text = "XXX" } metadata like this project already does with version.

@FFY00 FFY00 added the enhancement New feature or request label Jan 23, 2023
@FFY00
Copy link
Member

FFY00 commented Jan 23, 2023

Thanks for the suggestion! However, I think the semantics are a little bit different, XXX in your example would be the actual license text, so "Apache-2.0 OR MIT" wouldn't be the correct value. There's no way to specify that currently, but hopefully there will be with PEP 639, which adds a License-Expression core metadata field and assigns the value of project.license in pyproject.toml to the expression. So, this is another issue where we are blocked until that PEP, or an alternative, lands.

@FFY00 FFY00 added the blocked label Jan 23, 2023
@tristan957
Copy link
Author

It's unfortunate this wasn't thought of earlier when the pyproject.toml was designed. Seems so fundamental, but hopefully the PEP is accepted.

For now, I'll just leave it as is since I see no better way to express dual licensed software.

@FFY00
Copy link
Member

FFY00 commented Jan 23, 2023

My recommendation for that case would be to have a single license file with both licenses, and specifying it in pyproject.tml. But I agree, it's unfortunate, hopefully the PEP will land though and fix this.

@tristan957
Copy link
Author

Unfortunately that wouldn't be REUSE compliant from what I understand.

https://reuse.software/

@FFY00
Copy link
Member

FFY00 commented Jan 23, 2023

I didn't know about REUSE, thank you for pointing it out. I've only skimmed it a bit, but I can't tell how it wouldn't be compliant? You can still have the SPDX headers, you'd just have an extra license file for the Python tooling to read. In fact, using the REUSE spec you should even be able to automatically generate this file! Am I missing something here? 🤣

@tristan957
Copy link
Author

Hmm touch LICENSE in the root doesn't seem to cause the tool to fail. Oh well. Just throw REUSE on the pile of reasons that PEP should be advanced.

@FFY00
Copy link
Member

FFY00 commented Jan 23, 2023

Agreed. I have pinged the discourse thread. Let's see if we can get it to move forward.

(cc @CAM-Gerlach)

@tristan957
Copy link
Author

Thanks for your efforts.

@CAM-Gerlach
Copy link

Sorry, finishing what is hopefully the last major update got stuck beyond a pile of other things that came up over the past few months, but I've now got most of the next rewrite complete and it's near the top of my priority list to finish, hopefully in the next few days 🤞 I can also mention REUSE compliance and this issue in the rationale and on the thread.

@tristan957
Copy link
Author

@CAM-Gerlach no problem whatsoever. At least someone thought about it in the first place!

@CAM-Gerlach
Copy link

CAM-Gerlach commented Jan 24, 2023

Thanks, but to be fair that person with the original idea wasn't me—credit for that is due to @pombredanne

@tristan957
Copy link
Author

Could one of y'all link to the discourse thread where I presume discussion of the referenced PEP is? I am not familiar with the Python PEP process.

@FFY00
Copy link
Member

FFY00 commented Jan 30, 2023

@QuLogic
Copy link
Member

QuLogic commented Feb 11, 2024

Meson 1.1 now has license_files, which it would be nice to automatically distribute as a set of license files (especially if you have a dependency subproject that may be bundled in a wheel, but not if built in, e.g., a Linux distro).

@rgommers
Copy link
Contributor

Thanks @QuLogic. That does look potentially useful, especially for the subproject case you mention, since that cannot be done from pyproject.toml. I think we're still waiting for PEP 639 to land first though? Not sure what we'd do with license_files right now.

@eli-schwartz
Copy link
Member

You can install them to *.dist-info/licenses, regardless of the availability/usefulness for Metadata-Version: 2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants