From f7e89fcbebce7cd32d1f1706d44b6fb3ed2f4e55 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 25 Jun 2025 23:43:02 +0000 Subject: [PATCH] Fix build errors in setup.py and pyproject.toml Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> --- src/api/python/pyproject.toml | 2 +- src/api/python/setup.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/api/python/pyproject.toml b/src/api/python/pyproject.toml index c0edb4e67..1e23ff82b 100644 --- a/src/api/python/pyproject.toml +++ b/src/api/python/pyproject.toml @@ -7,7 +7,7 @@ name = "z3-solver" description = "an efficient SMT solver library" readme = "README.txt" requires-python = ">=3.8" -license = "MIT" +license = {text = "MIT"} authors = [ {name = "The Z3 Theorem Prover Project"} ] diff --git a/src/api/python/setup.py b/src/api/python/setup.py index 82ec7c102..a8f5419ce 100644 --- a/src/api/python/setup.py +++ b/src/api/python/setup.py @@ -9,7 +9,11 @@ import glob from setuptools import setup from setuptools.command.build import build as _build from setuptools.command.sdist import sdist as _sdist -from setuptools.command.bdist_wheel import bdist_wheel as _bdist_wheel +try: + from wheel.bdist_wheel import bdist_wheel as _bdist_wheel +except ImportError: + # wheel package not available, provide a dummy class + from setuptools.command.build import build as _bdist_wheel from setuptools.command.develop import develop as _develop class LibError(Exception):