Skip to content

Commit

Permalink
Add an option to include actual license terms to the output (#85624)
Browse files Browse the repository at this point in the history
When building products using PyTorch, it is often required to display license terms for all dependencies.
The feature itself has been implemented in #81500 but it seems there are no options to enable it.
This PR implements the option.

cc/ @mattip @rgommers
Pull Request resolved: #85624
Approved by: https://github.com/rgommers, https://github.com/seemethere
  • Loading branch information
kmaehashi authored and pytorchmergebot committed Nov 16, 2022
1 parent 8ebbd5a commit e2f0648
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions third_party/build_bundled.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,14 @@ def squeeze(t):
),
help="location to output new bundled licenses file",
)

parser.add_argument(
"--include-files",
action="store_true",
default=False,
help="include actual license terms to the output",
)
args = parser.parse_args()
fname = args.out_file
print(f"+ Writing bundled licenses to {args.out_file}")
with open(fname, 'w') as fid:
create_bundled(third_party, fid)
create_bundled(third_party, fid, args.include_files)

0 comments on commit e2f0648

Please sign in to comment.