From e34996fa9d8dab9f90d66603f273c5767036c229 Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Thu, 9 Mar 2017 06:00:34 +0100 Subject: [PATCH] add notes to README based on feedback in #916 Signed-off-by: Nikolaj Bjorner --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e0821ac79..b03888e9d 100644 --- a/README.md +++ b/README.md @@ -168,7 +168,10 @@ python scripts/mk_make.py --prefix=/home/leo --python --pypkgdir=/home/leo/lib/p If you do need to install to a non standard prefix a better approach is to use a [Python virtual environment](https://virtualenv.readthedocs.org/en/latest/) -and install Z3 there. +and install Z3 there. Python packages also work for Python3. +Under Windows, recall to build inside the Visual C++ native command build environment. +Note that the buit/python/z3 directory should be accessible from where python is used with Z3 +and it depends on libz3.dll to be in the path. ```bash virtualenv venv @@ -185,3 +188,10 @@ python -c 'import z3; print(z3.get_version_string())' ``` See [``examples/python``](examples/python) for examples. + + +Even though the build instruction says use python scripts/mk_make.py -x --python, this can build a package that works in python3. +The building should take place inside the Visual C++ 2015 x64 Native Build Tools Prompt`. +The z3.exe appears to be independent and can work anywhere, you can copy the built version wherever. The libz3.dll needs to be discoverable on the PATH. So you can copy both build/z3.exe and build/libz3.dll into somewhere on the PATH. +Then the build/python/z3 directory should be copied into the site-packages directory of Python. On Windows, this isn't done automatically, instead you have to find your Windows site-packages: like python3 -c 'import site; print(site.getsitepackages())', then copy the entire directory there. +Then to test if it finally all works run: \ No newline at end of file