Skip to content

Feature: provide local additions to grayskull_pypi_mapping.yaml #548

@tlambert03

Description

@tlambert03

Checklist

  • I added a descriptive title
  • I searched open requests and couldn't find a duplicate

What is the idea?

Apologies if I've missed this feature in the readme or prior discussion in the issues.

I'm helping someone setup conda-lock with a pyproject.toml setup that includes:

[project.optional-dependencies]
cuda = [
    "cupy-cuda11x ; platform_system != 'Darwin'",
]

naturally, specific cuda builds of of cupy aren't declared on conda as they are on pypi, but grayskull's lookup doesn't (currently) deal with all of those maps.

I know that I can provide my own --pypi_to_conda_lookup_file, but that appears to A) require a URI I can easily pass to requests.get B) presumably requires me to duplicate stuff that I need from grayskull's map?

looking through the source code, there doesn't appear to be any way to append to the lookup.

Why is this needed?

to assist in pypi-to-conda name mapping with minimal duplication

What should happen?

I'm thinking something like:

[tool.conda-lock.pypi-to-conda-name]
cupy-cuda11x = {"conda_name" = "cupy"}

or simpler if no additional info is needed

[tool.conda-lock.pypi-to-conda-name]
cupy-cuda11x = "cupy"
# or multiple packages, as would be useful in the case of cupy
cupy-cuda11x = ["cupy", "cuda-version=11.8"]

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions