mlc-z3-static
mlc-z3-static is a Python package that carries native Z3 4.16.0 development
artifacts for build systems. It does not provide Z3 Python bindings.
The wheel contains:
- Z3 C and C++ headers.
- A position-independent static
libz3(libz3.aon Unix-like platforms,.libon Windows). - A shared
libz3. - Relocatable CMake and pkg-config metadata for each library flavor, under
mlc_z3_static/<kind>/lib/cmake/z3andmlc_z3_static/<kind>/lib/pkgconfigforkindinstaticandshared.
The package is built with scikit-build-core: building a wheel runs
scripts/prepare_z3_v4_16_0.py, which downloads the pinned Z3 source archive,
verifies its SHA-256 digest, and builds both library flavors. Source builds are
opt-in (MLC_Z3_STATIC_ALLOW_SOURCE_BUILD=1) to avoid accidental long Z3
builds when pip cannot find a matching prebuilt wheel.
Python Helpers
Build systems can locate the packaged artifacts from Python:
import mlc_z3_static
print(mlc_z3_static.get_cmake_dir("static"))
print(mlc_z3_static.get_cmake_prefix_path("shared"))
print(mlc_z3_static.get_static_library_path())
print(mlc_z3_static.get_shared_library_path())
Or from a build script through the configuration CLI:
python -m mlc_z3_static.config --cmake-dir
python -m mlc_z3_static.config --prefix --kind shared
Downstream CMake Usage
Install the wheel into the Python environment used by the downstream build:
python -m pip install mlc-z3-static==4.16.0
Point CMake at the packaged static Z3 and use Z3's exported target:
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DZ3_DIR="$(python -m mlc_z3_static.config --cmake-dir)"
cmake_minimum_required(VERSION 3.20)
project(my_z3_consumer LANGUAGES C CXX)
find_package(Z3 CONFIG REQUIRED)
add_executable(my_z3_consumer main.cpp)
target_link_libraries(my_z3_consumer PRIVATE z3::libz3)
target_compile_features(my_z3_consumer PRIVATE cxx_std_20)
Or resolve the directory from inside CMake:
find_package(Python3 COMPONENTS Interpreter REQUIRED)
execute_process(
COMMAND "${Python3_EXECUTABLE}" -m mlc_z3_static.config --cmake-dir
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE Z3_DIR
)
find_package(Z3 CONFIG REQUIRED)
Z3 is implemented in C++, so even C-only consumers should enable CXX in the
CMake project and let CMake link through a C++ linker when using the static
archive. Use --kind shared (or get_cmake_prefix_path("shared")) to link the
shared flavor instead; each flavor has its own relocatable CMake prefix. See
example_project/ for a complete uv-managed consumer.
Local Build
Build a wheel directly:
MLC_Z3_STATIC_ALLOW_SOURCE_BUILD=1 python -m build --wheel
Use an existing Z3 checkout instead of downloading the pinned archive:
MLC_Z3_STATIC_ALLOW_SOURCE_BUILD=1 \
MLC_Z3_STATIC_SOURCE_DIR=/path/to/z3 \
python -m build --wheel
Build Release Wheels
From this directory:
scripts/wheel_manylinux_2_28_v4_16_0.sh
scripts/wheel_macos_v4_16_0.sh
The scripts use uv for host-side Python tooling, so Debian/Ubuntu system
Python restrictions such as PEP 668 and missing ensurepip do not affect the
host CIBW runner or post-build verifier. Both run cibuildwheel==3.3.1, retag
Linux wheels as manylinux_2_28, and verify each produced wheel from a clean
temporary virtual environment with:
scripts/wheel_verify.sh wheelhouse/<wheel-file>.whl
The verifier installs the wheel, configures a small CMake project against
mlc_z3_static.get_cmake_prefix_path("static"), links to z3::libz3, runs the
executable, and checks that the executable does not link against a dynamic
libz3.
The manylinux script defaults to the host architecture. Set
MLC_Z3_STATIC_ARCH=x86_64 or MLC_Z3_STATIC_ARCH=aarch64 to choose explicitly.
On macOS, local CIBW builds require an official python.org CPython installation.
The script defaults to the newest installed python.org CPython only as the build
interpreter. The output wheel is still Python-agnostic and tagged
py3-none-<platform>. Override CIBW_BUILD to force a specific installed build
interpreter, for example CIBW_BUILD=cp313-macosx_arm64.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mlc_z3_static-4.16.0.tar.gz.
File metadata
- Download URL: mlc_z3_static-4.16.0.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cdbe927977868bfd16ac54cd5c739beb2b51de02579710003fcc344fc9a5e6e8
|
|
| MD5 |
671402c9f85975abdc3ba80e3e781912
|
|
| BLAKE2b-256 |
e55b195aa11d0ccae01e9c146fc0c726422bc22b5f8236356000179a265e7bb8
|
Provenance
The following attestation bundles were made for mlc_z3_static-4.16.0.tar.gz:
Publisher:
mlc_z3_static_wheel.yml on mlc-ai/package
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mlc_z3_static-4.16.0.tar.gz -
Subject digest:
cdbe927977868bfd16ac54cd5c739beb2b51de02579710003fcc344fc9a5e6e8 - Sigstore transparency entry: 2332934000
- Sigstore integration time:
-
Permalink:
mlc-ai/package@254413e876fdd1ae9800f4bcd88a85f2889cba2d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mlc-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
mlc_z3_static_wheel.yml@254413e876fdd1ae9800f4bcd88a85f2889cba2d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file mlc_z3_static-4.16.0-py3-none-win_amd64.whl.
File metadata
- Download URL: mlc_z3_static-4.16.0-py3-none-win_amd64.whl
- Upload date:
- Size: 74.0 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2d4300509845829f12771b059c0a0e2686b24d29912f71e043a78fdb6585afb
|
|
| MD5 |
2904b95be42957a4b206a5416fff70e1
|
|
| BLAKE2b-256 |
d7e6703ca7c72ddc0e19bfbfbfcffae9465e1a1b6841923e6b3bd62e589398d8
|
Provenance
The following attestation bundles were made for mlc_z3_static-4.16.0-py3-none-win_amd64.whl:
Publisher:
mlc_z3_static_wheel.yml on mlc-ai/package
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mlc_z3_static-4.16.0-py3-none-win_amd64.whl -
Subject digest:
d2d4300509845829f12771b059c0a0e2686b24d29912f71e043a78fdb6585afb - Sigstore transparency entry: 2332934033
- Sigstore integration time:
-
Permalink:
mlc-ai/package@254413e876fdd1ae9800f4bcd88a85f2889cba2d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mlc-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
mlc_z3_static_wheel.yml@254413e876fdd1ae9800f4bcd88a85f2889cba2d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file mlc_z3_static-4.16.0-py3-none-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: mlc_z3_static-4.16.0-py3-none-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 68.5 MB
- Tags: Python 3, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6feafa5272a9213b51515e155a943e417b5c27a56a72a11bd2bf7beb8d114784
|
|
| MD5 |
a27694ec1fa0a2f8d920345628130a99
|
|
| BLAKE2b-256 |
aa73f7e94e0791d32b78c0d540ccd781dc0643e8af99d57b60305447bbf9912c
|
Provenance
The following attestation bundles were made for mlc_z3_static-4.16.0-py3-none-manylinux_2_28_x86_64.whl:
Publisher:
mlc_z3_static_wheel.yml on mlc-ai/package
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mlc_z3_static-4.16.0-py3-none-manylinux_2_28_x86_64.whl -
Subject digest:
6feafa5272a9213b51515e155a943e417b5c27a56a72a11bd2bf7beb8d114784 - Sigstore transparency entry: 2332934057
- Sigstore integration time:
-
Permalink:
mlc-ai/package@254413e876fdd1ae9800f4bcd88a85f2889cba2d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mlc-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
mlc_z3_static_wheel.yml@254413e876fdd1ae9800f4bcd88a85f2889cba2d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file mlc_z3_static-4.16.0-py3-none-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: mlc_z3_static-4.16.0-py3-none-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 65.3 MB
- Tags: Python 3, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c45af55c0e0ee5c349ba87a191f0c09db082a5109f2041bf3fe68f46d05dd339
|
|
| MD5 |
729d010be60253e2f42be261bb2dd11e
|
|
| BLAKE2b-256 |
77fe73730b1b3a204af0cac3d4a7ae199f0acc8fbaa0835d50a0b336bac722fa
|
Provenance
The following attestation bundles were made for mlc_z3_static-4.16.0-py3-none-manylinux_2_28_aarch64.whl:
Publisher:
mlc_z3_static_wheel.yml on mlc-ai/package
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mlc_z3_static-4.16.0-py3-none-manylinux_2_28_aarch64.whl -
Subject digest:
c45af55c0e0ee5c349ba87a191f0c09db082a5109f2041bf3fe68f46d05dd339 - Sigstore transparency entry: 2332934025
- Sigstore integration time:
-
Permalink:
mlc-ai/package@254413e876fdd1ae9800f4bcd88a85f2889cba2d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mlc-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
mlc_z3_static_wheel.yml@254413e876fdd1ae9800f4bcd88a85f2889cba2d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file mlc_z3_static-4.16.0-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: mlc_z3_static-4.16.0-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 46.8 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ee6c97c641da7ae0bf0da0b84a38576bdb73c7fb46ab62e26dac89223632abd
|
|
| MD5 |
3c121d1610a37b610387d939a7cc9085
|
|
| BLAKE2b-256 |
ec9cff40cdee457174e10b40186b92ff02ba8c6503ef8a41bd924a83db11f505
|
Provenance
The following attestation bundles were made for mlc_z3_static-4.16.0-py3-none-macosx_11_0_arm64.whl:
Publisher:
mlc_z3_static_wheel.yml on mlc-ai/package
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mlc_z3_static-4.16.0-py3-none-macosx_11_0_arm64.whl -
Subject digest:
3ee6c97c641da7ae0bf0da0b84a38576bdb73c7fb46ab62e26dac89223632abd - Sigstore transparency entry: 2332934010
- Sigstore integration time:
-
Permalink:
mlc-ai/package@254413e876fdd1ae9800f4bcd88a85f2889cba2d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mlc-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
mlc_z3_static_wheel.yml@254413e876fdd1ae9800f4bcd88a85f2889cba2d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file mlc_z3_static-4.16.0-py3-none-macosx_10_9_x86_64.whl.
File metadata
- Download URL: mlc_z3_static-4.16.0-py3-none-macosx_10_9_x86_64.whl
- Upload date:
- Size: 50.5 MB
- Tags: Python 3, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb5474ec52a3060af73b20979d1ff3a37e8a893973047c2b1db2abe88932ba26
|
|
| MD5 |
0ef828e7c557d0e93d505f2ce351e04e
|
|
| BLAKE2b-256 |
8ba69016fda1f5e866715ed37918ea4b89ba8897246856b53987ea55c081058b
|
Provenance
The following attestation bundles were made for mlc_z3_static-4.16.0-py3-none-macosx_10_9_x86_64.whl:
Publisher:
mlc_z3_static_wheel.yml on mlc-ai/package
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mlc_z3_static-4.16.0-py3-none-macosx_10_9_x86_64.whl -
Subject digest:
bb5474ec52a3060af73b20979d1ff3a37e8a893973047c2b1db2abe88932ba26 - Sigstore transparency entry: 2332934046
- Sigstore integration time:
-
Permalink:
mlc-ai/package@254413e876fdd1ae9800f4bcd88a85f2889cba2d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mlc-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
mlc_z3_static_wheel.yml@254413e876fdd1ae9800f4bcd88a85f2889cba2d -
Trigger Event:
workflow_dispatch
-
Statement type: