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.2.1.tar.gz (170.7 kB view details)

Uploaded Source

Built Distribution

simplesat-0.2.1-py2.py3-none-any.whl (207.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file simplesat-0.2.1.tar.gz.

File metadata

  • Download URL: simplesat-0.2.1.tar.gz
  • Upload date:
  • Size: 170.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for simplesat-0.2.1.tar.gz
Algorithm Hash digest
SHA256 9b7a944e0757e41c89fd6977e25d48b86dcfde512502b9219570faddc29330e2
MD5 eabe8c89fe338bc2daeed8aa889a63f5
BLAKE2b-256 6f2b9d2138e8239a16cea1e0d1f0371cf492d99560056dbf8e0eb9885545c590

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for simplesat-0.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1dcefe8835f52dcf7e57192dbb91dcf943915ac365d376eaee6447971cd1e85e
MD5 167a7d64f69c1e020be41aba33023a77
BLAKE2b-256 f74e62b0b8ce84e9c251f3fea10739d5d1e4891e0571298a85db35ce6acb830e

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