openSUSE / py2pack

Generate distribution packages from PyPI
Apache License 2.0
69 stars 40 forks source link

Issue generating spec when PyPI summary is empty #202

Closed zachspar closed 4 months ago

zachspar commented 4 months ago

Problem:

When there is no description in pyproject.toml the script fails when trying to create summary_no_ending_dot.

data['summary_no_ending_dot'] = re.sub(r'(.*)\.', r'\g<1>', data.get('summary'))
...
    return _compile(pattern, flags).sub(repl, string, count)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected string or bytes-like object, got 'NoneType'

Found when running py2pack generate parquet-py