pradyunsg / zazo

Pure Python Dependency Resolution (see https://github.com/sarugaku/resolvelib/ instead)
MIT License
80 stars 7 forks source link

Does this resolve environment markers? #5

Closed uranusjr closed 6 years ago

uranusjr commented 6 years ago

Or do dependencies need to resolve markers to decide whether it is needed on the way in? I’m looking into the possibility of building a environment-independent dependency resolver, and is intrigued to learn that pip has plans to build one itself. Due to pip’s nature (it only needs to know how to work out dependencies on the platform it is currently running on), I’m wondering if this fits my need, or if I need to look elsewhere.

pradyunsg commented 6 years ago

Hey @uranusjr! Sorry for the delay in a response.

Life did its thing and then I got engaged toward getting pip 10 ready for release.

Essentially, the resolution algorithm doesn't see environment markers. All the resolver sees are requirements and candidates for those requirements. The marker handling code would be on pip's side, specifically in a Provider which the resolver would interact with.

That's the plan right now anyway. It might change at some point in the future though -- no promises there until a 1.0.0. :P


If that answers your question, feel close this issue.

uranusjr commented 6 years ago

It does! Unfortunately this means I’ll need to roll my own environment marker parser. But thanks for the help though.

pradyunsg commented 6 years ago

@uranusjr Why not use packaging.pypa.io?

uranusjr commented 6 years ago

I used the wrong term. What I want to do is to build an abstract dependency tree that resolve environment markers lazily. It’s not about parsing but more combining those things into what I can use.

pradyunsg commented 6 years ago

Ah. Ohkay. Yeah, you'd have to. :)