7d819e0 Also provide pythonXdist() with PEP 503 normalized names (#1791530)

Authored and Committed by churchyard 4 years ago
    Also provide pythonXdist() with PEP 503 normalized names (#1791530)
    
    That is, we add new provides that replace dots with a dash.
    
    Package that used to provide python3dist(zope.component) and python3.8dist(zope.component)
    now also provides python3dist(zope-component) and python3.8dist(zope-component).
    
    Package that used to provide python3dist(a.-.-.-.a) now provides python3dist(a-a) as well.
    
    This is consistent with pip behavior, `pip install zope-component` installs zope.component.
    
    Historically, we have always used dist.key (safe_name) from setuptools,
    but that is a non-standardized convention -- whether or not it replaces dots
    with dashes is not even documented.
    We say we use "canonical name" or "normalized name" everywhere, yet we didn't.
    
    We really need to follow the standard (PEP 503):
    
    https://www.python.org/dev/peps/pep-0503/#normalized-names
    
    The proper function here would be packaging.utils.canonicalize_name
    https://packaging.pypa.io/en/latest/utils/#packaging.utils.canonicalize_name
    -- we reimplement it here to avoid an external dependency.
    
    This is the first required step needed if we want to change our requirements later.
    If we decide we don't, for whatever reason, this doesn't break anything.
    
        
  • Build completed
    success
    Built as python-rpm-generators-10-3.fc32
    4 years ago
file modified
+4 -1
file modified
+21 -0