diff options
author | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2021-12-12 14:35:51 +0100 |
---|---|---|
committer | Patrick Lehmann <Patrick.Lehmann@plc2.de> | 2021-12-12 14:50:05 +0100 |
commit | 03836b00aeddca2fd73f078d7850dc58be632466 (patch) | |
tree | c58ec03330d2bddd1c55cd81e3bfc81016139b3b /pyGHDL/libghdl/__init__.py | |
parent | f7b6325cb2b4ba5f722b5dceb3b36737a94fba47 (diff) | |
download | ghdl-03836b00aeddca2fd73f078d7850dc58be632466.tar.gz ghdl-03836b00aeddca2fd73f078d7850dc58be632466.tar.bz2 ghdl-03836b00aeddca2fd73f078d7850dc58be632466.zip |
Changed export decorator from pydecor to pyTooling.Decorators
Diffstat (limited to 'pyGHDL/libghdl/__init__.py')
-rw-r--r-- | pyGHDL/libghdl/__init__.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pyGHDL/libghdl/__init__.py b/pyGHDL/libghdl/__init__.py index 04cc387d9..372f5968b 100644 --- a/pyGHDL/libghdl/__init__.py +++ b/pyGHDL/libghdl/__init__.py @@ -38,13 +38,13 @@ from pathlib import Path from shutil import which from typing import List, Optional -from pydecor import export +from pyTooling.Decorators import export from pyGHDL import GHDLBaseException from pyGHDL.libghdl._types import Iir # from pyGHDL.libghdl._decorator import BindToLibGHDL -from pyGHDL.libghdl.version import __version__ +from pyGHDL import __version__ as ghdlVersion Nullable = Optional @@ -63,9 +63,9 @@ class LibGHDLException(GHDLBaseException): def _get_libghdl_name() -> Path: """Get the name of the libghdl library (with version and extension).""" - ver = __version__.replace("-", "_").replace(".", "_") + version = ghdlVersion.replace("-", "_").replace(".", "_") ext = {"win32": "dll", "cygwin": "dll", "msys": "dll", "darwin": "dylib"}.get(sys_platform, "so") - return Path("libghdl-{version}.{ext}".format(version=ver, ext=ext)) + return Path(f"libghdl-{version}.{ext}") def _check_libghdl_libdir(libdir: Path, basename: Path) -> Path: @@ -140,7 +140,7 @@ def _get_libghdl_path(): pass # Failed. - raise Exception("Cannot find libghdl {}".format(basename)) + raise Exception(f"Cannot find libghdl {basename}") def _initialize(): |