diff --git a/PyNVTX/__init__.py b/PyNVTX/__init__.py index d25c04e..7e7bbcb 100644 --- a/PyNVTX/__init__.py +++ b/PyNVTX/__init__.py @@ -3,6 +3,7 @@ from functools import wraps +from inspect import signature from PyNVTX_backend import * from .singleton import Singleton @@ -11,7 +12,7 @@ major_version = 0; minor_version = 3; -release_version = 0; +release_version = 1; NVTX_IDENTIFIER = "NVTX" REGISTRY = Registry() @@ -21,12 +22,13 @@ def annotate(label): def _annotate(func): @wraps(func) - def wrapped(*args, **kwargs): + def wrapper(*args, **kwargs): RangePushA(label) ret = func(*args, **kwargs) RangePop() return ret - return wrapped + wrapper.__signature__ = signature(func) + return wrapper return _annotate diff --git a/setup.py b/setup.py index 1716556..9448cb0 100644 --- a/setup.py +++ b/setup.py @@ -180,7 +180,7 @@ def build_extensions(self): setup( name="PyNVTX", - version="0.3.0", + version="0.3.1", author="Johannes Blaschke", author_email="johannes@blaschke.science", description="A thin python wrapper for the nvToolsExt (NVTX) library, using pybind11 ... with some bells and whistles thrown in for good measure.",