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

Uploaded Source

Built Distribution

simplesat-0.9.0-py3-none-any.whl (248.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: simplesat-0.9.0.tar.gz
  • Upload date:
  • Size: 203.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.18

File hashes

Hashes for simplesat-0.9.0.tar.gz
Algorithm Hash digest
SHA256 58ee84a914ae0ddb0b46076483b2921dae7e73867cb407c4394ca6691cda02fd
MD5 cabdae6959c7cba70a13df6881c659ab
BLAKE2b-256 766ede71984fdabc0ddec52f73a005f8f94462406ffe35a9d1ce2072d16a77b6

See more details on using hashes here.

File details

Details for the file simplesat-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: simplesat-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 248.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.18

File hashes

Hashes for simplesat-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0676323557b8a2550404a6dead624333157a55605a1e03e4dd98825d962a4bae
MD5 e980bffcf370acff082f67163bd96aca
BLAKE2b-256 8ffc67ad5f8e8e8ad3bdf037b5f5d4f14a35e5dde8b50a4184c6106e38900665

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