On Mon, Jul 23, 2018 at 3:19 PM Thomas Kluyver <tho...@kluyver.me.uk> wrote:
>
> 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/

Hey!

This is actually related to a really old feature request on pip. [1]
Essentially, the request is to allow the user to get the order and
versions of packages that pip would choose to install. Some of the
preparatory refactoring that's been done for bringing in a newer
implementation of the dependency resolver to pip [2] means that this
should be much easier to implement today than it would have been in
the past.

I should point out that these don't include build-dependencies for PEP 518.

Cheers,
Pradyun

[1]: https://github.com/pypa/pip/issues/53
[2]: https://github.com/pradyunsg/zazo
--
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/MJL5LSSHNFV76UJHS372EHZ72IC7CPFS/

Reply via email to