Skip to content

Cannot solve an environment with platform_system == Emscripten on Linux/OSX #6641

@maartenbreddels

Description

@maartenbreddels

Given https://github.com/posit-dev/py-shiny/blob/77a679271ee94a64af597ad1159f6ab6bdeb1b51/pyproject.toml
The following requirements file should be solvable for "platform_system == 'Emscripten'"

shiny>=1.0
watchfiles < 0.18

Since one of its dependencies is:

"watchfiles>=0.18.0;platform_system!='Emscripten'",

$ uv pip compile requirements-conflict.txt correctly gives:

uv pip compile requirements-conflict.txt            ✘ 2 feat_improve_resolver ✭ ✱ ◼
  × No solution found when resolving dependencies:
  ╰─▶ Because only the following versions of watchfiles{platform_system != 'Emscripten'} are available:
          watchfiles{platform_system != 'Emscripten'}<=0.18.0
          watchfiles{platform_system != 'Emscripten'}==0.18.1
          watchfiles{platform_system != 'Emscripten'}==0.19.0
          watchfiles{platform_system != 'Emscripten'}==0.20.0
          watchfiles{platform_system != 'Emscripten'}==0.21.0
          watchfiles{platform_system != 'Emscripten'}==0.22.0
          watchfiles{platform_system != 'Emscripten'}==0.23.0
      and shiny==1.0.0 depends on watchfiles{platform_system != 'Emscripten'}>=0.18.0, we can conclude that
      shiny==1.0.0 depends on watchfiles>=0.18.0.
      And because only shiny<=1.0.0 is available, we can conclude that shiny>=1.0.0 depends on
      watchfiles>=0.18.0.
      And because you require shiny>=1.0 and watchfiles<0.18, we can conclude that your requirements are
      unsatisfiable.

On Linux or OSX.

The seemingly only way to do 'cross-solving' would be to use the --python-platform flag, however, this is limited only to a particular set of values.

If it was possible to override the values for the environment marker (and ENV_VAR would suffice) it would allow cross solving for non-supported platforms.

My questions are:

  • Can I do what I want with the current version (0.3.3) of uv?
  • If not, is there a plan for, or interest in, allowing users to tweak/change the environment marker values, like platform_system?

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingresolverRelated to the package resolver

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions