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

Feature: provide local additions to grayskull_pypi_mapping.yaml #548

Open
2 tasks done
tlambert03 opened this issue Nov 10, 2023 · 2 comments · May be fixed by #549
Open
2 tasks done

Feature: provide local additions to grayskull_pypi_mapping.yaml #548

tlambert03 opened this issue Nov 10, 2023 · 2 comments · May be fixed by #549

Comments

@tlambert03
Copy link

tlambert03 commented Nov 10, 2023

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

@maresb
Copy link
Contributor

maresb commented Nov 10, 2023

Looks sensible! I like the second schema where each package name has a specification given as a string or list of strings.

Would you like to implement it?

@tlambert03
Copy link
Author

i could give it a shot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants