diff --git a/src/pyproject.toml b/src/pyproject.toml index 539136b..bf8598d 100644 --- a/src/pyproject.toml +++ b/src/pyproject.toml @@ -31,8 +31,9 @@ dynamic = ["version"] [project.scripts] testium = "testium:main" -[tool.setuptools.package-data] -docpkg = ["*.pdf"] +[tool.setuptools.packages.find] +where=["."] +exclude=["lua_func", "py_func"] [tool.setuptools.dynamic] version = {file = ["VERSION"]} diff --git a/src/testium/interpreter/utils/version.py b/src/testium/interpreter/utils/version.py index 6d64fd0..d5765db 100644 --- a/src/testium/interpreter/utils/version.py +++ b/src/testium/interpreter/utils/version.py @@ -46,21 +46,24 @@ def get_testium_version(): return (ver + " (binary release)") # Executed from sources - if prefs.settings.git_supported: - git = import_module("git") - path = tm.get_main_dir() - try: - return repo_rev(path) - except git.InvalidGitRepositoryError: - pkg_rec = import_module("pkg_resources") + try: + if prefs.settings.git_supported: + git = import_module("git") + path = tm.get_main_dir() try: - ret = pkg_rec.get_distribution("testium").version - _cached_versions.update({path: ret}) - return str(ret) + " (wheel release)" - except: - return "Warning : testium not versioned" - else: - return "Warning git not supported in your settings, version of testium is unknown." + return repo_rev(path) + except git.InvalidGitRepositoryError: + pkg_rec = import_module("pkg_resources") + try: + ret = pkg_rec.get_distribution("testium").version + _cached_versions.update({path: ret}) + return str(ret) + " (wheel release)" + except: + return "Warning : testium not versioned" + else: + return "Warning git not supported in your settings, version of testium is unknown." + except: + return ("Unknown") def get_modifications(path : str)-> str: