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

Use license classifiers rather than the license field. #1776

Merged
merged 1 commit into from Jun 19, 2019

Conversation

@Steap
Copy link
Contributor

@Steap Steap commented Jun 1, 2019

The license field has a 'free' format, while the classifiers are unique
identifiers, similar to SPDX identifiers. In the documentation, we
should therefore showcase the use of classifiers.

The license field has a 'free' format, while the classifiers are unique
identifiers, similar to SPDX identifiers. In the documentation, we
should therefore showcase the use of classifiers.
@Steap Steap force-pushed the license-classifiers branch from fb752c1 to 59dd72d Jun 1, 2019
jaraco
jaraco approved these changes Jun 2, 2019
@@ -136,16 +136,18 @@ dependencies, and perhaps some data files and scripts::
author="Me",
author_email="me@example.com",
description="This is an Example Package",
license="PSF",
Copy link
Member

@pganssle pganssle Jun 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think maybe we should leave this in? It's actually preferable to use both the license field and the classifiers.

If you look at the PyPI page for python-dateutil, you'll see that the "free form" field populates the "License" field in "Meta" sidebar, whereas the license classifiers are shown lower down on the page, under "Classifiers".

How about just changing this to:

    license="PSF",    # Short form description, should also use classifiers

Copy link
Member

@jaraco jaraco Jun 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The official documentation specifically indicates that license is only for licenses not present in Trove classifiers, so I've been discouraging use of license when it's redundant (or contradicting) the classifiers.

Copy link
Contributor Author

@Steap Steap Jun 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not really hurt, but is indeed not necessary.

I'm the author of a tool that tries to guess licenses (among other pieces of information) from the JSON served by PyPI and generated from setup.{cfg,py}, and I think that if we really wanted to give an example of the use of the "license" field, we should mention SPDX identifiers. People who use SPDX identifiers/expressions when the classifiers are not precise enough (think of the ":: BSD" classifier, which can refer to BSD-2, BSD-3, BSD-4, BSD-x-with-some-exception, etc.) make it really easy to guess the license.

Copy link
Member

@pganssle pganssle Jun 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine for now. Indeed it seems that the spec for the license field says that it should only be used when there is no appropriate license in the classifiers, so I'm going to merge this.

@pganssle pganssle merged commit 6bdd9c5 into pypa:master Jun 19, 2019
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants