15 Commits

Author SHA1 Message Date
Campbell Barton
5fe261c89d Cleanup: declare __all__ for many scripts in tools/ 2025-01-04 20:27:58 +11:00
Dalai Felinto
7ed7e584cb make license: mention Blender Foundation copyright for the bundle 2024-12-03 17:55:21 +01:00
Dalai Felinto
f8ca9ee46b make license: Tweak on generated comments
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.
2024-12-03 17:55:21 +01:00
Campbell Barton
a0453ab87a Cleanup: update use of typing in for Python scripts 2024-10-23 12:48:09 +11:00
Campbell Barton
68b1fe3986 Merge branch 'blender-v4.3-release' 2024-10-23 12:30:01 +11:00
Campbell Barton
d1c82cc537 Cleanup: spelling in comments 2024-10-23 12:25:58 +11:00
Campbell Barton
9df897a1d8 make license: back port changes from main
Back port fix & changes from main to keep licenses compatible for all
releases:

- 675aa86ca6
- 9f0043b8d6
- 81025eabd2
2024-10-21 20:57:58 +11:00
Dalai Felinto
8cff5ecb4d Cleanup: make_license: use Path more deliberately
Changes suggested by Sybren Stüvel.

The original suggestion was even to use resolve() instead of abspath,
but we don't even need that here.
2024-10-21 11:55:27 +02:00
Dalai Felinto
d1857d1d58 Revert "Cleanup: make_license: use Path more deliberately"
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.
2024-10-21 11:45:04 +02:00
Dalai Felinto
94959cb84f Cleanup: make_license: use Path more deliberately
Changes suggested by Sybren Stüvel.
2024-10-21 11:40:45 +02:00
Campbell Barton
81025eabd2 Refactor: various changes to "make license"
- 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.
2024-10-19 17:53:17 +11:00
Campbell Barton
9f0043b8d6 Fix "make license" hiding duplicate versions of the same library
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.
2024-10-19 17:53:16 +11:00
Campbell Barton
675aa86ca6 make license: clear trailing white space & ensure newline at eof
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.
2024-10-19 17:52:01 +11:00
Falk David
f1a92ea4dd Formatting 2024-10-18 18:10:31 +02:00
Dalai Felinto
0a4dbc57b8 make license: command to update the license file
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
2024-10-18 17:09:43 +02:00