Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-Platform Dependency Resolution #7541

Closed
2 tasks done
SinOverCos opened this issue Feb 21, 2023 · 7 comments
Closed
2 tasks done

Cross-Platform Dependency Resolution #7541

SinOverCos opened this issue Feb 21, 2023 · 7 comments
Labels
kind/question User questions (candidates for conversion to discussion)

Comments

@SinOverCos
Copy link

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the FAQ and general documentation and believe that my question is not already covered.

Feature Request

Poetry is able to show the dependency tree of a package. It also supports conditional installs through environment markers. I'm wondering if it's possible to join these two features together to make poetry a cross-platform dependency resolver?

I am looking for something like pip's installation report, where pip can do a dry run of an installation and outputs the list of dependencies and transitive dependencies that would be installed for a given package. pip also supports passing in values for python version, abi version, platform, and implementation values so that the installation report represents what would've been installed for a target platform, instead of the current running python interpreter version and the host machine platform/os.

@SinOverCos SinOverCos added kind/feature Feature requests/implementations status/triage This issue needs to be triaged labels Feb 21, 2023
@dimbleby
Copy link
Contributor

poetry already performs cross-platform dependency resolution

if pip already does whatever it is you want - use pip for that!

@SinOverCos
Copy link
Author

@dimbleby unfortunately pip isn’t able to override environment markers for conditional installs — pypa/pip#11664

Can you share a link for the poetry cross platform dependency resolution?

@dimbleby
Copy link
Contributor

I don't understand what you're asking for.

Can you share a link for the poetry cross platform dependency resolution?

What do you mean?

When poetry performs dependency resolution, it finds a cross-platform solution. The same poetry lockfile can be taken to any platform and used to install.

perhaps poetry export is something like what you want?? But I really can't tell.

@neersighted neersighted added kind/question User questions (candidates for conversion to discussion) and removed kind/feature Feature requests/implementations status/triage This issue needs to be triaged labels Feb 22, 2023
@neersighted
Copy link
Member

The issue as written is already implemented by Poetry; Poetry was the first tool to do cross-platform dependency resolution and it's still at the core of Poetry. I'm going to close this as it's not actionable, but feel free to continue to discuss here, or convert this issue to a discussion, or join us on Discord.

Please try to clarify what it is you are trying to do @SinOverCos; currently it does not make sense, and the linked pip issue doesn't make sense in terms of Poetry. Poetry is not pip, there are often no 1:1 analogies between the projects.

@SinOverCos
Copy link
Author

SinOverCos commented Feb 22, 2023

My high-level goal is to answer this question:

If I wanted to install package foo on a target system that e.g.

  • runs $os operator system
  • with $ver version of python
  • with the $impl implementation of the interpreter (e.g. cpython, jython, etc)
  • with $abi ABIs accessible (e.g. cp37m, abi3)

then what are the specific packages, dependencies, and transitive dependencies that will get installed (and is it install by source or via a specific wheel)? The answer to this query varies because some dependencies might only get installed for certain versions of python (e.g. backports), or for certain OSs (e.g. graphics libraries), etc.

I want to be able to answer this query on my local machine for any values of $os, $ver, $impl, and $abi on a hypothetical target system, without having to actually e.g. build an image with those parameters and then running installation on that image to find out.

Am I able to use poetry for something like this?

@dimbleby
Copy link
Contributor

Not directly

poetry export and then parse the markers yourself is the nearest thing that comes to mind

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/question User questions (candidates for conversion to discussion)
Projects
None yet
Development

No branches or pull requests

3 participants