Skip to main content

Simple SAT solvers for use in Enstaller

Project description

Prototype for SAT-based dependency handling. This is a work in progress, do not expect any API not to change at this point.

Installation

To install the python package, simple do as follows:

git clone --recursive https://github.com/enthought/sat-solver
cd sat-solver
pip install -e .

Example usage

TODO

Usage from the CLI

To try things out from the CLI, you need to write a scenario file (yaml format), see simplesat/tests/simple_numpy.yaml for a simple example.

To print the rules:

python scripts/print_rules.py simplesat/tests/simple_numpy.yaml

To print the operations:

python scripts/solve.py simplesat/tests/simple_numpy.yaml

Comparing with php’s composer

First, clone composer’s somewhere on your machine:

git clone https://github.com/composer/composer

Then, use the scripts/scenario_to_php.py script to write a php file that will print the composer’s solution for a given scenario:

python scripts/scenario_to_php.py \
    --composer-root <path to composer github checkout> \
    simplesat/tests/simple_numpy.yaml \
    scripts/print_operations.php.in

This will create a scripts/print_operations.php script you can simply execute w/ php:

php scripts/print_operations.php

Bibliography

On the use of SAT solvers for managing packages:

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

simplesat-0.5.0.post1.tar.gz (201.1 kB view details)

Uploaded Source

Built Distribution

simplesat-0.5.0.post1-py2.py3-none-any.whl (243.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file simplesat-0.5.0.post1.tar.gz.

File metadata

File hashes

Hashes for simplesat-0.5.0.post1.tar.gz
Algorithm Hash digest
SHA256 d048481595b47d48db2de86219785454c2558ac6ac23f69c95cf5a5bb2c6d5cd
MD5 3e73391272370f89761a884ef84aa950
BLAKE2b-256 6b2ee79fe984c236cf5d27eb500e364c2458b8c6c78f8a3b91d975181609c2b9

See more details on using hashes here.

File details

Details for the file simplesat-0.5.0.post1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for simplesat-0.5.0.post1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 15b43d750e5a62cd51ae2073acffc63c4a9ba816f63fb2f0d7a2365be3bef4ca
MD5 5540a9c288b05aba98a4761b71d5b1c4
BLAKE2b-256 f41b8f5acd9b839847048171a0894be8d8e1cff427904087b8471943635965fc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page