build.plat,setup: fix Jinja2 dependency.
Jinja2 version 2.11 has a broken dependency constraint that allows its dependency on markupsafe to pull in a version that it is not actually compatible with the interface of. Fix this by upgrading the dependency to `~=3.0`. This requires a small patch to the code to replace the deprecated `@jinja2.contextfunction` decorator with the replacement `@jinja2.pass_context`since `@jinja2.contextfunction` is removed in Jinja2 version 3.1.0.
This commit is contained in:
parent
f6253b3851
commit
85d56a74a5
|
@ -375,7 +375,7 @@ class TemplatedPlatform(Platform):
|
|||
else:
|
||||
return jinja2.Undefined(name=var)
|
||||
|
||||
@jinja2.contextfunction
|
||||
@jinja2.pass_context
|
||||
def invoke_tool(context, name):
|
||||
env_var = tool_env_var(name)
|
||||
if context.parent["syntax"] == "sh":
|
||||
|
|
2
setup.py
2
setup.py
|
@ -43,7 +43,7 @@ setup(
|
|||
"importlib_metadata; python_version<'3.8'", # for __version__ and amaranth._toolchain.yosys
|
||||
"importlib_resources; python_version<'3.9'", # for amaranth._toolchain.yosys
|
||||
"pyvcd~=0.2.2", # for amaranth.pysim
|
||||
"Jinja2>=2.11,<4.0", # for amaranth.build
|
||||
"Jinja2~=3.0", # for amaranth.build
|
||||
],
|
||||
extras_require={
|
||||
# this version requirement needs to be synchronized with the one in amaranth.back.verilog!
|
||||
|
|
Loading…
Reference in a new issue