No project description provided
Project description
pyparaspace: a Python wrapper for the ParaSpace timelines planner -- a simple, flexible and extensible solver for timeline-based planning problems using the Z3 Theorem Prover.
Installing
Install using Pip.
pip install pyparaspace
See the file testPyParaspace.py for example usage.
Building locally
Requirements: Rust, Cargo, Clang/LLVM/LibClang, CMake.
- Create a virtual environment
python3 -m venv env
source env/bin/activate
- Install maturin
pip install maturin
- Build package
maturin develop
Building and releasing
This section is intended for package maintainers. The pyparaspace package is
released on PyPi with Python wheel packages that make it convenient to use
paraspace without needing to set up Rust and C++ compilers and tools.
Through the z3-sys package's static link option, we get the whole planner,
including the Z3 solver, statically linked. This greatly increases the
convenience for users of the library.
Windows and Manylinux platforms are currently supported.
Windows
If building and installing the local package works, then using maturin build --release
should also correctly build a wheel package, which can be uploaded to PyPi using maturin publish.
Because the z3-rs feature "static-link-z3" is used, the Z3 library is built during the building of paraspace. To make sure that C++ compiler paths are correctly set up, use the "x64 Native Tools Command Prompt" that is installed by Visual Studio. If you get compilation errors after trying to build in a different environment, the z3-rs package doesn't always correctly rebuild the right parts, so it might be necessary to explicitly clean the build cache (cargo clean or git clean).
Note that building paraspace with the statically linked Z3 can take some time, typically 10-20 minutes.
When in the correct environment, publishing a new release should be possible with:
maturin publish --skip-existing
Manylinux
paraspace requires an Rust version 1.60 and Clang version 3.5 (to compile the Z3 solver),
which makes it requires a bit of setup to correcly build the manylinux wheel.
There is a Dockerfile available that can be used to build a Docker image with
an up-to-date Rust version and version 7 of the LLVM/Clang toolchain.
The builds should work using the following commands.
docker build -t mybuild .
docker run --rm -v $(pwd):/io mybuild publish --skip-existing --compatibility manylinux2014 -i python3.10
Project details
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 pyparaspace-0.1.7.tar.gz.
File metadata
- Download URL: pyparaspace-0.1.7.tar.gz
- Upload date:
- Size: 61.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e01ab46aa335cdf2bfb76b7d71eb67d0f0b25028503a87ce9a7e0b67f2d9658
|
|
| MD5 |
3a3fde726b90318cb4ddf82a5e039085
|
|
| BLAKE2b-256 |
58c15f468de1330c354d0e0e5c915e646c86f70076cd0eb75df68903e6d89199
|
File details
Details for the file pyparaspace-0.1.7-cp310-none-win_amd64.whl.
File metadata
- Download URL: pyparaspace-0.1.7-cp310-none-win_amd64.whl
- Upload date:
- Size: 6.1 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.2.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
783b2e5d6abc63865985a52a59a85ed2be1429810f12a991370e0005580fe747
|
|
| MD5 |
03a98559c520cf4675da02f89e4618c2
|
|
| BLAKE2b-256 |
0ef29341698c39a253d80fb20193c94a38195ad872f4c5d69ca2276b6a3bcb6c
|
File details
Details for the file pyparaspace-0.1.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pyparaspace-0.1.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 9.6 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e28ac87aa14696ab17eab1782ecbaa4e49cad376d50c248db3ab76c15ac09709
|
|
| MD5 |
a17c34ac8a31d30f930339a417aac891
|
|
| BLAKE2b-256 |
68316a578eb627afe24d2753b085f35753c7f98110eba45ad88ab17b8895fb58
|