How to use grayskull - 1 common examples

To help you get started, we’ve selected a few grayskull examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github regro / cf-scripts / conda_forge_tick / audit.py View on Github external
def grayskull_audit_feedstock(fctx: FeedstockContext, ctx: MigratorSessionContext):
    """Uses grayskull to audit the requirements for a python package
    """
    # TODO: come back to this, since CF <-> PyPI is not one-to-one and onto
    pkg_name = fctx.attrs["name"]
    pkg_version = fctx.attrs["version"]
    recipe = GrayskullFactory.create_recipe(
        "pypi", pkg_name, pkg_version, download=False
    )

    with tempfile.TemporaryDirectory() as td:
        recipe.generate_recipe(
            td,
            mantainers=list(
                {
                    m: None
                    for m in fctx.attrs["meta_yaml"]["extra"]["recipe-maintainers"]
                }
            ),
        )
        with open(os.path.join(td, pkg_name, "meta.yaml"), "r") as f:
            out = f.read()
    return out

grayskull

Project to generate recipes for conda packages

Apache-2.0
Latest version published 2 months ago

Package Health Score

78 / 100
Full package analysis

Popular grayskull functions

Similar packages