cryotools / cosipy

Coupled snowpack and ice surface energy and mass balance model in Python
GNU General Public License v3.0
52 stars 30 forks source link

`entries` not defined in config (Python3.9) #76

Open benatouba opened 2 days ago

benatouba commented 2 days ago

In cosipy/config.py:

def get_entry_points(package_name: str = "cosipy"):
    """Get package entry points.

    Returns:
        Generator: All of the package's available entry points.
    """

    if sys.version_info >= (3, 10):
        entries = entry_points(group="console_scripts")
    else:
        entries = entries["console_scripts"]
    entrypoints = (
        ep
        for ep in entries
        if ep.name.startswith(package_name.upper())
        or ep.name.startswith(package_name.lower())
        or package_name.lower() in ep.name
    )

    return entrypoints

entries is not defined in python3.9. Will fix.