Skip to content

Unsolvable pypi dependencies if platform excluded by feature #1051

@baszalmstra

Description

@baszalmstra

The following manifest supports several platforms but the test environment only supports linux-64:

[project]
name = "project"
channels = ["conda-forge"]
platforms = ["linux-64", "osx-arm64", "win-64", "osx-arm64"]

[dependencies]
python = "3.11.8"

[pypi-dependencies]
timeago = "==1.0.16"

[feature.test]
platforms = ["linux-64"]

[environments]
test = ["test"]

All environments also have pypi-dependencies (because they are in the default feature), this means that to be able to solve this project we need a Python interpreter at runtime. The problem is that the test environment only supports linux-64 which means that on any other platform, there is no Python interpreter available and you get this error (after #1052 is merged):

x Unable to solve pypi dependencies for the test environment because no compatible python interpreter can be installed for the current platform
   ,-[4:13]
 3 | channels = ["conda-forge"]
 4 | platforms = ["linux-64", "win-64"]
   :             ^^^^^^^^^^^|^^^^^^^^^^
   :                        `-- even though the projects does include support for 'win-64'
 5 |
   `----
    ,-[13:13]
 12 | [feature.test]
 13 | platforms = ["linux-64"]
    :             ^^^^^^|^^^^^
    :                   `-- feature 'test' does not support 'win-64'
 14 |
    `----

I don't know what the solution to this problem would be. Perhaps we create a subset "solve environment" that just includes python which we can try to install to solve pypi-dependnencies regardless of the platform? That would also alleviate some of the issues reported in #1046.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-designNeeds a design so it can be implementedpypiIssue related to PyPI dependencies

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions