SERVER-102638 Use Cheetah3 for gen_thirdpartyreadme.py (#33819)
GitOrigin-RevId: fda15dbdad741d905a030f684dc82ce1b037a591
This commit is contained in:
parent
ab24af8629
commit
546531e9ce
@ -52,6 +52,7 @@ a notice will be included in
|
||||
| [linenoise] | BSD-2-Clause | Unknown | | ✗ |
|
||||
| [MongoDB C Driver] | Apache-2.0 | 1.27.6 | ✗ | ✗ |
|
||||
| [Mozilla Firefox] | MPL-2.0 | 128.8.0esr | unknown | ✗ |
|
||||
| [nlohmann-json] | MIT | 3.11.3 | ✗ | |
|
||||
| [nlohmann.json.decomposed] | MIT | 3.10.5 | unknown | |
|
||||
| [node] | ISC | 22.1.0 | unknown | |
|
||||
| [ocspbuilder] | MIT | 0.10.2 | | |
|
||||
|
||||
2
poetry.lock
generated
2
poetry.lock
generated
@ -5322,4 +5322,4 @@ oldcrypt = []
|
||||
[metadata]
|
||||
lock-version = "2.1"
|
||||
python-versions = ">=3.10,<4.0"
|
||||
content-hash = "d0314a12da4a869d84cf94cb92db74b8ca11af77c6b401d383344aebb9f978f0"
|
||||
content-hash = "23c9dc6597d1892e81228331e5f4f2c2bf4a3eb54aabef54bdac9941953cfb10"
|
||||
|
||||
@ -153,7 +153,6 @@ ninja = [
|
||||
curatorbin = "^1.2.4"
|
||||
PyKMIP = "0.10.0"
|
||||
evergreen-py = "^3.9.0"
|
||||
jinja2 = "^3.1.4"
|
||||
mock = "^5.1.0"
|
||||
shrub-py = "^3.1.4"
|
||||
ocspresponder = "^0.5.0"
|
||||
|
||||
@ -19,9 +19,9 @@ not authored by MongoDB, and has a license which requires reproduction,
|
||||
a notice will be included in
|
||||
`THIRD-PARTY-NOTICES`.
|
||||
|
||||
{{ component_chart }}
|
||||
$component_chart
|
||||
|
||||
{{ component_links }}
|
||||
$component_links
|
||||
|
||||
## WiredTiger Vendored Test Libraries
|
||||
|
||||
@ -29,7 +29,7 @@ The following Python libraries are transitively included by WiredTiger,
|
||||
and are used by that component for testing. They don't appear in
|
||||
released binary artifacts.
|
||||
|
||||
{{ wiredtiger_chart }}
|
||||
$wiredtiger_chart
|
||||
|
||||
## Dynamically Linked Libraries
|
||||
|
||||
|
||||
15
src/third_party/scripts/gen_thirdpartyreadme.py
vendored
15
src/third_party/scripts/gen_thirdpartyreadme.py
vendored
@ -1,4 +1,4 @@
|
||||
from jinja2 import Environment, FileSystemLoader
|
||||
from Cheetah.Template import Template
|
||||
import sys
|
||||
import os
|
||||
import json
|
||||
@ -186,16 +186,17 @@ def chart_to_string(chart: list[list[str]]) -> str:
|
||||
return chart
|
||||
|
||||
|
||||
def create_markdown_with_template(data: str) -> None:
|
||||
file_loader = FileSystemLoader('.')
|
||||
env = Environment(loader=file_loader)
|
||||
template = env.get_template(TEMPLATE_PATH)
|
||||
output = template.render(data)
|
||||
def create_markdown_with_template(data):
|
||||
output = str(Template.compile(file=TEMPLATE_PATH,
|
||||
compilerSettings={
|
||||
'commentStartToken': '//',
|
||||
'directiveStartToken': '!!',
|
||||
'directiveEndToken': '!!',
|
||||
})(namespaces=[data]))
|
||||
|
||||
with open(README_PATH, 'w') as f:
|
||||
f.write("[DO NOT MODIFY THIS FILE MANUALLY. It is generated by src/third_party/tools/gen_thirdpartyreadme.py]: #\n\n")
|
||||
f.write(output)
|
||||
f.write("\n")
|
||||
|
||||
logging.info("Markdown file created successfully.")
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user