Skip to content

Commit ffbae89

Browse files
committed
Fix working with copied library
1 parent f81613e commit ffbae89

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/peakrdl_python/templates/addrmap.py.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ from {{ peakrdl_python_lib(depth=lib_depth) }} import AsyncCallbackSet, AsyncCal
8686
from {{ peakrdl_python_lib(depth=lib_depth) }} import NormalCallbackSet, NormalCallbackSetLegacy
8787
{% endif %}
8888

89-
{{ peakrld_version_check(depth=lib_depth) }}
89+
{{ peakrld_version_check() }}
9090

9191
{% for property_enum in unique_property_enums %}
9292
from .{{top_node.inst_name}}_property_enums import {{property_enum.type_name}}_property_enumcls

src/peakrdl_python/templates/template_ultilities.py.jinja

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
2323
{% if skip_lib_copy %}peakrdl_python.{% else %}.{{ '.' * depth }}{% endif %}sim_lib
2424
{%- endmacro -%}
2525

26-
{%- macro peakrld_version_check(depth) %}
27-
from {% if skip_lib_copy %}peakrdl_python.{% else %}.{{ '.' * depth }}{% endif %}__about__ import __version__
26+
{%- macro peakrld_version_check() %}
27+
{% if skip_lib_copy %}
28+
from peakrdl_python.__about__ import __version__
2829
if __version__ != '{{version}}':
2930
raise RuntimeError('Library built with peakrdl-python version {{version}} however '
3031
f'version {__version__} is installed')

0 commit comments

Comments
 (0)