ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Package.Pep503

Description

The PEP 503 name grammar (PyPI): the canonical key a package name matches on.

canonicalise dispatches here on the ecosystem tag, and every other caller reads the grammar through that dispatch.

Synopsis

Documentation

normalisePyPI :: Text -> Text Source #

PEP 503 name normalisation: lower-case, then collapse each run of -, _ or . to a single -, so two spellings of one distribution share a canonical key.