Python bindings: (#2112)

- Switch from versioningit to setuptools-scm
- Disable building of tests via DUNICORN_BUILD_TESTS var
This commit is contained in:
@Antelox
2025-02-18 09:28:06 +01:00
committed by GitHub
parent 1cb8952b14
commit 0f45f15e30
2 changed files with 4 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
[build-system] [build-system]
requires = ["setuptools", "build", "wheel", "versioningit"] requires = ["setuptools>=64", "build", "wheel", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta" build-backend = "setuptools.build_meta"
[project] [project]
@@ -40,4 +40,5 @@ test = [
[tool.setuptools.packages.find] [tool.setuptools.packages.find]
include = ["unicorn*"] include = ["unicorn*"]
[tool.versioningit] [tool.setuptools_scm]
root = '../../'

View File

@@ -102,7 +102,7 @@ def build_libraries():
has_msbuild = shutil.which('msbuild') is not None has_msbuild = shutil.which('msbuild') is not None
conf = 'Debug' if int(os.getenv('DEBUG', 0)) else 'Release' conf = 'Debug' if int(os.getenv('DEBUG', 0)) else 'Release'
cmake_args = ['cmake', '-B', BUILD_DIR, "-DCMAKE_BUILD_TYPE=" + conf] cmake_args = ['cmake', '-B', BUILD_DIR, "-DCMAKE_BUILD_TYPE=" + conf, "-DUNICORN_BUILD_TESTS=off"]
if os.getenv("UNICORN_TRACER"): if os.getenv("UNICORN_TRACER"):
cmake_args += ["-DUNICORN_TRACER=on"] cmake_args += ["-DUNICORN_TRACER=on"]
if conf == 'Debug': if conf == 'Debug':