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

Include license file in the generated wheel package #1083

Merged
merged 1 commit into from Nov 12, 2018

Conversation

Projects
None yet
3 participants
@jdufresne
Contributor

jdufresne commented Nov 12, 2018

The wheel package format supports including the license file. This is
done using the [metadata] section in the setup.cfg file. For additional
information on this feature, see:

https://wheel.readthedocs.io/en/stable/user_guide.html#including-license-files-in-the-generated-wheel-file

Helps project comply with its own license.

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

Contribution checklist:

(also see CONTRIBUTING.rst for details)

  • wrote descriptive pull request text
  • added/updated test(s) N/A
  • updated/extended the documentation N/A
  • added relevant issue keyword
    in message body
  • added news fragment in changelog folder
    • fragment name: <issue number>.<type>.rst for example (588.bugfix.rst)
    • <type> is must be one of bugfix, feature, deprecation,breaking, doc, misc
    • if pr has no issue: consider creating one first or change it to the pr number after creating the pr
    • "sign" fragment with "by @"
    • please use full sentences with correct case and punctuation, for example: "Fix issue with non-ascii contents in doctest text files - by :user:superuser."
    • also see examples
  • added yourself to CONTRIBUTORS (preserving alphabetical order)

@jdufresne jdufresne force-pushed the jdufresne:license branch from 803ed58 to 859b199 Nov 12, 2018

@ssbarnea

I don't personally like updating unrelated files in a change that mentions something else.
It means that I should add myself to contributors document, even if I fix a missing comma?

Anyway, I am not aware about any policy that would forbit that so +1

Include license file in the generated wheel package
The wheel package format supports including the license file. This is
done using the [metadata] section in the setup.cfg file. For additional
information on this feature, see:

https://wheel.readthedocs.io/en/stable/user_guide.html#including-license-files-in-the-generated-wheel-file

Helps project comply with its own license.

> The above copyright notice and this permission notice shall be
> included in all copies or substantial portions of the Software.

@jdufresne jdufresne force-pushed the jdufresne:license branch from 859b199 to adf5680 Nov 12, 2018

@jdufresne

This comment has been minimized.

Contributor

jdufresne commented Nov 12, 2018

If you're saying I shouldn't add my name to CONTRIBUTORS then I was merely following the contributing instructions in the PR template. So if that is incorrect, perhaps that could be updated.

Either way, I've rebased so my name is no longer being added as part of this change (it was included in a previous PR)

@gaborbernat

This comment has been minimized.

Member

gaborbernat commented Nov 12, 2018

We have no change amount needed to add it. It's fine to be added 👍 I'm not sure about this change, isn't it already added by setup.py? Does this only adds a meta field in the output? What is the expected change here?

@jdufresne

This comment has been minimized.

Contributor

jdufresne commented Nov 12, 2018

Before this change, the .whl file created by the command python setup.py bdist_wheel contains the following files:

tox/cli.py
tox/interpreters.py
tox/_pytestplugin.py
tox/constants.py
tox/session.py
tox/_quickstart.py
tox/__init__.py
tox/util.py
tox/config.py
tox/exception.py
tox/hookspecs.py
tox/venv.py
tox/version.py
tox/result.py
tox/__main__.py
tox/package/__init__.py
tox/package/view.py
tox/package/builder/isolated.py
tox/package/builder/__init__.py
tox/package/builder/legacy.py
tox-3.5.4.dev6+g2ef9c88.dist-info/DESCRIPTION.rst
tox-3.5.4.dev6+g2ef9c88.dist-info/entry_points.txt
tox-3.5.4.dev6+g2ef9c88.dist-info/metadata.json
tox-3.5.4.dev6+g2ef9c88.dist-info/top_level.txt
tox-3.5.4.dev6+g2ef9c88.dist-info/WHEEL
tox-3.5.4.dev6+g2ef9c88.dist-info/METADATA
tox-3.5.4.dev6+g2ef9c88.dist-info/RECORD

After this change it now also contains the file:

tox-3.5.4.dev7+gadf5680.dist-info/LICENSE.txt

So, now the LICENSE file is distributed with the .whl package. This helps communicate the full license to library users and helps hold them accountable to it. When a wheel package is installed, this LICENSE.txt fille will be copied to library's *.dist-info/ directory.

Further, the license contains the text:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

The wheel package is a copy of the software. Therefore, it should contain the LICENSE text with its copyright.

@gaborbernat gaborbernat merged commit 1e8fa7b into tox-dev:master Nov 12, 2018

4 checks passed

codeclimate All good!
Details
codeclimate/diff-coverage 100% (50% threshold)
Details
codeclimate/total-coverage 95% (0.0% change)
Details
tox ci #tox ci_20181112.08 succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment