mlc-z3-static
mlc-z3-static is a Python package that carries native Z3 development
artifacts for build systems. It does not provide Z3 Python bindings. The pinned
Z3 release is recorded in version.py; at runtime it is exposed
as mlc_z3_static.Z3_VERSION, mlc_z3_static.Z3_TAG, and
mlc_z3_static.Z3_COMMIT.
The wheel contains:
- Z3 C and C++ headers.
- A position-independent static
libz3(libz3.aon Unix-like platforms,.libon Windows). - Relocatable CMake and pkg-config metadata under
mlc_z3_static/static/lib/cmake/z3andmlc_z3_static/static/lib/pkgconfig.
The package is built with scikit-build-core: building a wheel runs
scripts/prepare_z3.py, which downloads the pinned Z3 source archive,
verifies its SHA-256 digest, and builds the static library. Prebuilt wheels
are published for common platforms; elsewhere pip builds from the sdist like
any other compiled package (see Build From Source).
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())
print(mlc_z3_static.get_static_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
Downstream CMake Usage
Install the wheel into the Python environment used by the downstream build:
python -m pip install mlc-z3-static
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. No shared Z3 library or DLL is bundled. See
example_project/ for a complete uv-managed consumer.
Build From Source
Building from the sdist (or this directory) needs a C++20 compiler with
<format> support (Z3 5.x requires it; e.g. GCC >= 13, Clang >= 17, Visual
Studio 2022), network access to download the pinned Z3 source archive, and
Python; CMake (>= 3.26) and Ninja are pulled in as build requirements. A static Z3 build
takes a while; set CMAKE_BUILD_PARALLEL_LEVEL to use more cores:
CMAKE_BUILD_PARALLEL_LEVEL=8 python -m pip install --no-binary mlc-z3-static mlc-z3-static
Build a wheel from a checkout:
python -m build --wheel
Use an existing Z3 checkout instead of downloading the pinned archive:
MLC_Z3_STATIC_SOURCE_DIR=/path/to/z3 python -m build --wheel
Build Release Wheels
The publishing workflow builds py3-none wheels for manylinux_2_28
(x86_64, aarch64), macOS (arm64, x86_64), and Windows (AMD64,
ARM64). On Windows the inner Z3 build uses the same Visual Studio platform
(-A x64 or -A ARM64) as the wheel being built. MSVC builds explicitly
enable /Zc:inline to omit unused inline COMDAT code and data from object
files while preserving the static linking interface.
From this directory:
scripts/wheel_manylinux_2_28.sh
scripts/wheel_macos.sh
scripts\wheel_windows.ps1
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. They run cibuildwheel==3.3.1, which tests each wheel in a
clean virtual environment with the pytest suite (see Tests): it
links a small CMake consumer against z3::libz3 against the static library, runs it,
and checks that the static flavor does not link a dynamic libz3. The
manylinux script retags Linux wheels as manylinux_2_28.
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.
Tests
The pytest suite under tests/python/ exercises the installed package. The
tests check the version metadata, artifact paths, and the config CLI, and configure,
link, and run a small CMake consumer against the static library (this needs a C++ compiler). From this directory:
python -m pip install ".[test]" # or: python -m pip install <wheel> pytest
pytest
Run pytest against an installed wheel; the tests import the installed
package, not python/. cibuildwheel runs the same suite on every built wheel.
License
This package is distributed under the MIT License, the license of the Z3
artifacts it bundles. LICENSE is a verbatim copy of Z3's upstream
LICENSE.txt, so this directory and its sdist are self-contained. The wheel
also carries the license copied during packaging from the SHA-256-verified
upstream source archive as mlc_z3_static/licenses/LICENSE-Z3.txt; the build
fails if that file is missing.
Bumping the version
version.py is the single version source. To move to a new Z3
release, edit only that file:
-
Z3_VERSION: the upstream release (the Git tag is derived asz3-<Z3_VERSION>). -
__version__: the Python package version; it must equalZ3_VERSION, orZ3_VERSIONplus a PEP 440 suffix such as.post1. -
Z3_COMMIT: the commit the release tag points to:gh api repos/Z3Prover/z3/commits/z3-<Z3_VERSION> --jq .sha
-
Z3_ARCHIVE_SHA256: the SHA-256 of the archivescripts/prepare_z3.pydownloads:curl -fsSL https://github.com/Z3Prover/z3/archive/<Z3_COMMIT>.tar.gz | sha256sum
Package metadata, the build scripts, the default build directory, and the
generated runtime module mlc_z3_static/_version.py all read these values.
The publishing workflow's version_suffix input runs
scripts/stamp_version.py --suffix <suffix>, which rewrites __version__ in
the build checkout and rejects versions not based on Z3_VERSION.
Metadata
Release files for mlc-z3-static 5.3.1.post0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mlc_z3_static-5.3.1.post0.tar.gz | 19.6 kB | With provenance | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| mlc_z3_static-5.3.1.post0-py3-none-win_arm64.whl | Python 3 | none | Windows ARM64 | Details |
| mlc_z3_static-5.3.1.post0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| mlc_z3_static-5.3.1.post0-py3-none-manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64 | Details |
| mlc_z3_static-5.3.1.post0-py3-none-manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.28+ ARM64 | Details |
| mlc_z3_static-5.3.1.post0-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
| mlc_z3_static-5.3.1.post0-py3-none-macosx_10_9_x86_64.whl | Python 3 | none | macOS 10.9+ x86-64 | Details |
Total release size: 245.4 MB
Release files / mlc_z3_static-5.3.1.post0.tar.gz
| Download URL | mlc_z3_static-5.3.1.post0.tar.gz |
|---|---|
| Size | 19.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
66cd01a5a7799480c0708aa4c4a258640e3ef74a85b36492babd70e5c09f115c
|
|
BLAKE2b-256 checksum How to use checksums |
174d01d7b6a1d1ef34790a40359c2a9ec84b602a04cad659cdc0d99997650ee1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logRelease files / mlc_z3_static-5.3.1.post0-py3-none-win_arm64.whl
| Download URL | mlc_z3_static-5.3.1.post0-py3-none-win_arm64.whl |
|---|---|
| Size | 65.0 MB |
| Tags | Python 3 Windows ARM64 |
|
SHA-256 checksum How to use checksums |
ddb48db5296b6b2abac91de2c21e3d0cf082af7578d921e2713fb16ff211d46b
|
|
BLAKE2b-256 checksum How to use checksums |
d9ba14055750ceb04ad553a8e361ba889cd919d5544a8ada6226fab81b2534e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logRelease files / mlc_z3_static-5.3.1.post0-py3-none-win_amd64.whl
| Download URL | mlc_z3_static-5.3.1.post0-py3-none-win_amd64.whl |
|---|---|
| Size | 58.5 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
35a3829f13c2c2ce5c7d8737a1a81446662e70f3d872fbc444b4a82fe95abfa4
|
|
BLAKE2b-256 checksum How to use checksums |
6847ff7105971b86f0378e45ff87c13e22317b6983925badd61e304137361f6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logRelease files / mlc_z3_static-5.3.1.post0-py3-none-manylinux_2_28_x86_64.whl
| Download URL | mlc_z3_static-5.3.1.post0-py3-none-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 33.4 MB |
| Tags | Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
5e8d779d108e0cc09761b51ff4c7268ecbd27d16243bf96c0ae7742e55f022fa
|
|
BLAKE2b-256 checksum How to use checksums |
4f0afaad3c4272dd32bee8d98f127bb955587e20f39d722e37c8e89c440bdda8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logRelease files / mlc_z3_static-5.3.1.post0-py3-none-manylinux_2_28_aarch64.whl
| Download URL | mlc_z3_static-5.3.1.post0-py3-none-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 32.9 MB |
| Tags | Linux glibc 2.28+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
49729980c73cc2c43d9ce3dadf014db000c5ce3d364b4a8a7fc45de48494321c
|
|
BLAKE2b-256 checksum How to use checksums |
dbab4636fc0c22a5afe2ef643ad55b979ac54d9b93ba9bcd6e0d60df5e3e021e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logRelease files / mlc_z3_static-5.3.1.post0-py3-none-macosx_11_0_arm64.whl
| Download URL | mlc_z3_static-5.3.1.post0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 28.6 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d9ca6e7d77fbc0118e344fc882a991ed74a43bd2b45f54e7adbd46bccfa21059
|
|
BLAKE2b-256 checksum How to use checksums |
51e31e54997fbf922e4467baab2da7c496dfac1c3a308b751e03053daf110238
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logRelease files / mlc_z3_static-5.3.1.post0-py3-none-macosx_10_9_x86_64.whl
| Download URL | mlc_z3_static-5.3.1.post0-py3-none-macosx_10_9_x86_64.whl |
|---|---|
| Size | 27.0 MB |
| Tags | Python 3 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
3ffb1de52509821bb923e2377144ffbfd2710955a71d3c9c3aa064b8d062b646
|
|
BLAKE2b-256 checksum How to use checksums |
d796bbb7a1ef8e8adcecc7ff1cba2526b5f055b21b66748d4b37c9c2bc4707a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logSecurity for mlc-z3-static 5.3.1.post0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 7 files in this release have been uploaded with provenance metadata.
Attestation for mlc_z3_static-5.3.1.post0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.