Code Monkey home page Code Monkey logo

depsolver's Introduction

Travis CI Build Status

This is a prototype for a decent dependency solver for python.

Example:

# Simple scenario: nothing installed, install numpy, 2 versions available
# in the repository
from depsolver import Package, Pool, Repository, Requirement, Solver

numpy_1_6_1 = Package.from_string("numpy-1.6.1")
numpy_1_7_0 = Package.from_string("numpy-1.7.0")

repo = Repository([numpy_1_6_1, numpy_1_7_0])

pool = Pool([repo])

installed_repo = Repository()

# only one operation here: install numpy 1.7.0 (most recent available
# version)
requirement = Requirement.from_string("numpy")
operations = Solver(pool, installed_repo).solve(requirement)

More complex scenarios are also supported, e.g.:

  • direct dependencies, obviously (if A depends on B, B is installed first)
  • packages can provide other packages
  • does not update already installed packages if they satisfy the requirements

Many more are not yet supported:

  • declaring conflicts and obsoletes
  • real policies that can be customized
  • support for update
  • version pinning
  • repositories that are not in-memory (e.g. remote ones)

Depsolver main planned features are:

  • version based on semantic versions RFC (version 2.0.0-rc1 at this time)
  • handles dependency in a sane way
  • pluggable back-end for metadata storage
  • reasonable fast: resolving dependencies should not take too long (not more than a few seconds for a user who has only a few tens of packages currently installed)
  • well tested and documented

The design is strongly inspired from PHP Composer packager, itself started as a port of libsolver.

Thanks to Enthought to let me open source this project !

depsolver's People

Contributors

cournape avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.