From c976f53fcd55d54b2d36d3f5dafe656f33840311 Mon Sep 17 00:00:00 2001 From: Alan Tse Date: Sat, 7 Mar 2026 20:22:09 -0800 Subject: [PATCH] build: fix poetry --- libbs/__init__.py | 6 +++++- pyproject.toml | 10 ++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/libbs/__init__.py b/libbs/__init__.py index 4d0d6c4..3fcbdd9 100644 --- a/libbs/__init__.py +++ b/libbs/__init__.py @@ -1,4 +1,8 @@ -__version__ = "3.3.4" +from importlib.metadata import version as _get_version, PackageNotFoundError as _PackageNotFoundError +try: + __version__ = _get_version("libbs") +except _PackageNotFoundError: + __version__ = "unknown" import logging diff --git a/pyproject.toml b/pyproject.toml index 3e98d55..d9c7efb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,6 +13,7 @@ classifiers = [ license = {text = "BSD 2 Clause"} description = "Your Only Decompiler API Lib - A generic API to script in and out of decompilers" urls = {Homepage = "https://github.com/binsync/libbs"} +version = "3.3.4" requires-python = ">= 3.10" dependencies = [ "toml", @@ -27,7 +28,6 @@ dependencies = [ "filelock", "networkx" ] -dynamic = ["version"] [project.readme] file = "README.md" @@ -41,12 +41,16 @@ test = [ "ipdb" ] ghidra = [ - "PySide6-Essentials>=6.4.2,!=6.7.0" + "PySide6-Essentials>=6.4.2,!=6.7.0; python_version < '3.15'" ] [project.scripts] libbs = "libbs.__main__:main" +[tool.pytest.ini_options] +# faulthandler conflicts with JPype's JVM on Windows +addopts = "-p no:faulthandler" + [tool.setuptools] include-package-data = true license-files = ["LICENSE"] @@ -54,5 +58,3 @@ license-files = ["LICENSE"] [tool.setuptools.packages] find = {namespaces = false} -[tool.setuptools.dynamic] -version = {attr = "libbs.__version__"} \ No newline at end of file