Skip to content

License file in wheels and conda packages does not contain any third-party licenses #50695

@rgommers

Description

@rgommers

🐛 Bug

License files for relevant code that's used or linked to must be distributed with binaries. There are many license files in third_party that must be distributed together with any source or binary distribution.

This was noticed by the conda-forge team in conda-forge/pytorch-cpu-feedstock#34

To Reproduce

Steps to reproduce the behavior:

  1. Download a wheel from, e.g., https://pypi.org/project/torch/1.7.1/#files
  2. Unpack it (it's just a zipfile)
  3. Inspect the license file in the torch-1.7.0.dist-info directory - it's only a copy of https://github.com/pytorch/pytorch/blob/master/LICENSE. No other license files (there are many in third_party/ are mentioned or present anywhere in the package.

Expected behavior

The correct way of dealing with this is normally:

  • Keep the main LICENSE file in the root of the repo unchanged (the default license for new code contributed to the project).
  • Keep a separate list of license files present in the repo, in a script or metadata file
  • At build time - for any sdist, wheel or conda package - concatenate all those license files together into a single LICENSE file. If desired separating the main license from the rest with a "licenses for bundled code" section header.
  • Insert that generated license file in the artifacts.

Also, given how often dependencies get added or changed in third_party, add some kind of a check that all files named LICENSE, LICENSE.* or COPYING are actually included.

cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser @seemethere @malfet @walterddr

Metadata

Metadata

Assignees

Labels

high prioritymodule: binariesAnything related to official binaries that we release to userstriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions