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] pypi -> conda mapper #2

Open
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

AlbertDeFusco
Copy link
Contributor

@AlbertDeFusco AlbertDeFusco commented Jun 4, 2024

Hi! Thank you for creating this plugin. This will really help my workflows.

In this PR I've used grayskull to translate pypi package names in pyproject.toml to conda package names. For example, given this pyproject.toml entry

[build-system]
build-backend = "hatchling.build"
requires = ["hatchling", "hatch-vcs>=0.3", "setuptools-scm>=7.1", "hatch-conda-build"]

[project]
requires-python = ">=3.9"
dependencies = [
    "requests==2.31.0",
    "Flask",
    "build",
    "art",
    "pydantic[email]<2"
]

the output meta.yaml will be

requirements:
  host:
    - python >=3.9
    - pip
    - hatchling
    - hatch-vcs >=0.3
    - setuptools-scm >=7.1
  run:
    - python >=3.9
    - requests ==2.31.0
    - flask
    - python-build
    - ascii-art
    - pydantic <2

Other modifications in this PR

  • conda-build outputs are placed into ./dist/conda and you can install them using -c ./dist/conda
  • testing for requirements translation, conda recipe content, and output builds

This addresses #3

@AlbertDeFusco
Copy link
Contributor Author

Hi, @costrouc. Is there anything I can do to help get this approved and merged?

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 this pull request may close these issues.

1 participant