After coming back to this file after a few months I myself did not remember where to edit it.
Adding the "Introduction and formatting" bullet item and update others for brevity.
This reverts commit 94959cb84f.
make_license.py was actually refactored in main, and this is introducing
a minor conflict. I will leave make_license as it is in 4.3, and focus
on the cleanups in main itself.
- Avoid manipulating a dictionary arguments, use return values &
iterators to return results.
- Move logic out of the file reading context once the file was read
(reducing right-shift).
- Move intermediate license data from a dictionary to a named-tuple
for better clarity & type safety.
- Remove use of `dataclass` as a container for constants,
as it quite clear to define the constants directly in the
global namespace.
- Group imports at the beginning of the file (no need to quiet pylint).
- Add headings for code sections.
- Use double quotes.
- Use the term "dir" instead of both dir/folder.
- Note the limitations parsing CMake files directly,
with a possible alternative.
There are two "SPIRV TOOLS" IGC_SPIRV_TOOLS & SHADERC_SPIRV_TOOLS, in:
build_files/build_environment/cmake/versions.cmake
Show both in the license.md file.
Also remove use of defaultdict to make it clear where dictionary
values are created.
Clear trailing space as this has as space at the line end
has a special meaning in markdown.
Write a new line at the end of the file
since some development tools add this or note when it's missing,
it's simplest just to add it.
This generates a `license.md` file with all the relevant information about
the different libraries and their respecive licenses.
This should replace: THIRD-PARTY-LICENSES.txt
Important files:
* `make_license.py` (main script called by `make license`.
* `licenses.json` (file to add the definition of new licenses).
* `licenses/*/*.txt` (individual license files.
The `license.md` groups the libraries per license, list their
corresponding copyright information and include the complete license.
Code includes contributions from:
* Campbell Barton (multi-line parser for versions.cmake).
* Thomas Dinges (Windows support for `make license`).
Part of: !129018