Skip to content

Commit 8e2fcad

Browse files
authored
docs: revise third-party license tables in docs (#329)
I had to bump git-bot-feedback so that its metadata uses a SPDX identifier (instead of a LICENSE file which is not a custom license). I also removed the hard-coded table about OpenSSL now that we don't use it anymore.
1 parent 0ca69c4 commit 8e2fcad

3 files changed

Lines changed: 8 additions & 16 deletions

File tree

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cpp-linter/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ thiserror = { workspace = true }
3434
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
3535

3636
[dependencies.git-bot-feedback]
37-
version = "0.5.4"
37+
version = "0.5.5"
3838
features = ["file-changes"]
3939
# path = "../../git-bot-feedback"
4040
# git = "https://github.com/2bndy5/git-bot-feedback"

docs/license_gen.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
[MIT]: https://choosealicense.com/licenses/mit
1010
[Apache-2.0]: https://choosealicense.com/licenses/apache-2.0/
1111
[MPL-2.0]: https://choosealicense.com/licenses/mpl-2.0
12+
[GPL-3.0]: https://choosealicense.com/licenses/gpl-3.0/
1213
"""
1314

1415
TABLE_HEADER = "| Dependency | License |\n|:------------|:-------|\n"
@@ -23,17 +24,6 @@
2324
{TABLE_HEADER}\
2425
"""
2526

26-
OPTIONAL_DEPS = f"""## Optional dependencies
27-
28-
The following are conditionally included in binaries (using the `openssl-vendored`
29-
feature on a case-by-case basis) because it is a dependency of
30-
[git2](https://crates.io/crates/git2):
31-
32-
{TABLE_HEADER}\
33-
| [openssl](https://crates.io/crates/openssl) | [Apache-2.0] |
34-
| [openssl-probe](https://crates.io/crates/openssl-probe) | [MIT] OR [Apache-2.0] |
35-
"""
36-
3727
PY_BINDING_HEADER = f"""## Bindings' dependencies
3828
3929
### Python binding
@@ -44,7 +34,9 @@
4434
4535
{TABLE_HEADER}"""
4636

47-
SELF_DEP = re.compile(r"(\| \[cpp-linter v[0-9.]+[^\s]*)[^\]]+(\]\(.*)$")
37+
SELF_DEP = re.compile(
38+
r"(\| \[(?:cpp-linter|clang-installer) v[0-9.]+[^\s]*)[^\]]+(\]\(.*)$"
39+
)
4840

4941

5042
class TreeGetter:
@@ -80,6 +72,7 @@ def get_output(self) -> str:
8072
.replace(" MIT", " [MIT]")
8173
.replace(" Apache-2.0", " [Apache-2.0]")
8274
.replace(" MPL-2.0", " [MPL-2.0]")
75+
.replace(" GPL-3.0", " [GPL-3.0]")
8376
.strip()
8477
)
8578
self_match = SELF_DEP.match(dep)
@@ -96,7 +89,6 @@ def get_output(self) -> str:
9689
doc += tg.get_output()
9790
# print(doc)
9891
print(doc, file=io_doc)
99-
print(f"\n{OPTIONAL_DEPS}\n", file=io_doc)
10092
tg.package("cpp-linter-py")
10193
doc = tg.get_output()
10294
print(f"\n{PY_BINDING_HEADER}{doc}", file=io_doc)

0 commit comments

Comments
 (0)