Skip to content

Entrypoint is not implemented for multiple pips #1262

Closed
@chrislovecnm

Description

@chrislovecnm

So entry point does not work in multiple pips. It is not supported. So I have to have two different templates or modify code.

The pip hub, whl_alias both need to be modified. The key is that we have this:

def entry_point(pkg, script = None):
    """entry_point returns the target of the canonical label of the package entrypoints.
    """
    if not script:
        script = pkg
    return "@@rules_python~override~pip~pip_39_{}//:rules_python_wheel_entry_point_{}".format(_clean_name(pkg), script)

Created by a repo rules like @pip_39_pylint. But that is one of the spokes that has "39" for the Python version.

In the pip hub we need to have the capability to have:

def entry_point(pkg, script = None):
    """entry_point returns the target of the canonical label of the package entrypoints.
    """
    if not script:
        script = pkg
    return "@@rules_python~override~pip~pip_{}_{}//:rules_python_wheel_entry_point_{}".format(_clean_name(pkg),python_version, script)

We need the Python version in the pip hub via a select statement.

Originally posted by @chrislovecnm in #1254 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions