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

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.

Use license classifiers rather than the license field.
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 Steap: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",

This comment has been minimized.

Copy link
@pganssle

pganssle Jun 19, 2019

Member

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

This comment has been minimized.

Copy link
@jaraco

jaraco Jun 19, 2019

Member

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.

This comment has been minimized.

Copy link
@Steap

Steap Jun 19, 2019

Author Contributor

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.

This comment has been minimized.

Copy link
@pganssle

pganssle Jun 19, 2019

Member

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

Summary 1 potential rule
Details
codecov/patch Coverage not affected when comparing d36295a...59dd72d
Details
codecov/project 84.63% remains the same compared to d36295a
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.