I just happened to be looking into this area, and may be able to offer some 
help.

Some background information (optional reading): 
https://github.com/pypa/pipenv/issues/2596#issuecomment-405656806

Sébastien (@sdispater) is the author of Poetry, including the resolver, called 
Mixology. As he mentioned in the issue, he recently rewrote the resolver, and 
had yet to decide when and how to extract if from other inner workings of 
Poetry.

The old version of Mixology (before the rewrite), however, is still available 
on PyPI, and is good enough for this particular use with some additional work.

I made a quick, very inefficient implementation, available as a GitHub Gist:
https://gist.github.com/uranusjr/a7a9f20c6e43810bd19f0c73e9617182

Hopefully this would help with your need 😊

TP


From: distutils-sig-requ...@python.org
Sent: 24 July 2018 00:00
To: distutils-sig@python.org

I don’t know the details, but I did read that Poetry has a sophisticated 
dependency resolver. 

https://github.com/sdispater/poetry

I don’t know if there is a way to access the resolver independently of the 
tool, but perhaps it would provide a handy reference. 
2018년 7월 23일 (월) 오전 5:49, Thomas Kluyver <tho...@kluyver.me.uk>님이 작성:
Hi all,

Do we know of any tool that can, given the name of one or more packages, follow 
dependency chains and produce a list of packages in the order they need to be 
installed, assuming every package needed will be built from source?

Running "pip download --no-binary :all: ipython" gets me a set of sdists to be 
installed, but I lose any information about the order. I assume some packages 
will fail to build if their dependencies are not installed first, so the order 
is significant.

Pip appears to keep track of the ordering internally: if I run "pip install 
--no-binary :all: ipython", all the dependencies are downloaded, and then the 
collected packages are installed starting from those with no dependencies and 
finishing with the package I requested. But I don't know of any way to get this 
information out of pip. Is there an option that I'm overlooking? Or some other 
tool that can do this?

The use case I'm thinking about is to automatically generate instructions for a 
build system which separates the downloading and installing steps, so for each 
step it expects one or more URLs to download, along with instructions for how 
to install that piece. The installation steps shouldn't download further data. 
I could work around the issue by telling it to download all the sdists in a 
single step and then install in one shot with --no-index and --find-links. But 
it's more elegant - and better for caching - if we can install each package as 
a single step.

Thanks,
Thomas
--
Distutils-SIG mailing list -- distutils-sig@python.org
To unsubscribe send an email to distutils-sig-le...@python.org
https://mail.python.org/mm3/mailman3/lists/distutils-sig.python.org/
Message archived at 
https://mail.python.org/mm3/archives/list/distutils-sig@python.org/message/LGTH3IYBMVKBS4PYGFJ6A7N5GW5ZKFUY/
--
Distutils-SIG mailing list -- distutils-sig@python.org
To unsubscribe send an email to distutils-sig-le...@python.org
https://mail.python.org/mm3/mailman3/lists/distutils-sig.python.org/
Message archived at 
https://mail.python.org/mm3/archives/list/distutils-sig@python.org/message/VX734J3S4EBKDSZR5BIRQPOH5LVHTHHE/

Reply via email to