pantry/projects/github.com/Z3Prover/z3/package.yml
Max Howell d619c00c39
In fact z3 needs python during build
It’s worrying that the CI/CD builds found python even though we weren't specifying it @jheider
2023-03-17 15:14:30 -04:00

51 lines
No EOL
1.2 KiB
YAML

distributable:
url: https://github.com/Z3Prover/z3/archive/z3-{{version}}.tar.gz
strip-components: 1
versions:
github: Z3Prover/z3
strip: /z3-/
build:
dependencies:
tea.xyz/gx/cc: c99
tea.xyz/gx/make: '*'
cmake.org: ^3
python.org: ^3
working-directory: build
script: |
cmake .. $ARGS
make --jobs {{hw.concurrency}} install
env:
ARGS:
- -DZ3_LINK_TIME_OPTIMIZATION=ON
- -DZ3_INCLUDE_GIT_DESCRIBE=OFF
- -DZ3_INCLUDE_GIT_HASH=OFF
- -DZ3_INSTALL_PYTHON_BINDINGS=ON
- -DZ3_BUILD_EXECUTABLE=ON
- -DZ3_BUILD_TEST_EXECUTABLES=OFF
- -DZ3_BUILD_PYTHON_BINDINGS=ON
- -DZ3_BUILD_DOTNET_BINDINGS=OFF
- -DZ3_BUILD_JAVA_BINDINGS=OFF
- -DZ3_USE_LIB_GMP=OFF
- -DCMAKE_INSTALL_PREFIX={{prefix}}
- -DCMAKE_BUILD_TYPE=Release
- -DCMAKE_INSTALL_PYTHON_PKG_DIR={{prefix}}/lib/python
runtime:
env:
PYTHONPATH: ${{prefix}}/lib/python
provides:
- bin/z3
test:
dependencies:
tea.xyz/gx/cc: c99
gnu.org/wget: '*'
python.org: ^3.11
script: |
wget https://raw.githubusercontent.com/Z3Prover/z3/master/examples/c/test_capi.c
cc -lz3 test_capi.c
v="$(python -c 'import z3; print(z3.get_version_string())')"
test "$v" = {{version}}