rpm-software-management / rpmlint

Tool for checking common errors in rpm packages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PythonCheck crashes when checking metadata requirements

bnavigator opened this issue · comments

Since the introduction of the requirements check, the rpmbuild of python-jupyter-events crashes at the end:

[   19s] RPMLINT report:
[   19s] ===============
[   19s] (none): E: fatal error while reading //home/abuild/rpmbuild/RPMS/noarch/python310-jupyter-events-0.6.3-0.noarch.rpm: bad character range t-n at position 18
[   19s] Traceback (most recent call last):
[   19s]   File "/opt/testing/bin/rpmlint.real", line 33, in <module>
[   19s]     sys.exit(load_entry_point('rpmlint==2.4.0', 'console_scripts', 'rpmlint')())
[   19s]   File "./rpmlint/cli.py", line 189, in lint
[   19s]   File "./rpmlint/lint.py", line 121, in run
[   19s]   File "./rpmlint/lint.py", line 91, in _run
[   19s]   File "./rpmlint/lint.py", line 256, in validate_files
[   19s]   File "./rpmlint/lint.py", line 281, in validate_file
[   19s]   File "./rpmlint/lint.py", line 274, in validate_file
[   19s]   File "./rpmlint/lint.py", line 290, in run_checks
[   19s]   File "./rpmlint/checks/AbstractCheck.py", line 17, in check
[   19s]   File "./rpmlint/checks/AbstractCheck.py", line 60, in check_binary
[   19s]   File "./rpmlint/checks/PythonCheck.py", line 46, in check_file
[   19s]   File "./rpmlint/checks/PythonCheck.py", line 126, in check_requires_metadata
[   19s]   File "./rpmlint/checks/PythonCheck.py", line 136, in _check_requirements
[   19s]   File "./rpmlint/checks/PythonCheck.py", line 155, in _check_require
[   19s]   File "./re.py", line 251, in compile
[   19s]   File "./re.py", line 303, in _compile
[   19s]   File "./sre_compile.py", line 788, in compile
[   19s]   File "./sre_parse.py", line 955, in parse
[   19s]   File "./sre_parse.py", line 444, in _parse_sub
[   19s]   File "./sre_parse.py", line 841, in _parse
[   19s]   File "./sre_parse.py", line 444, in _parse_sub
[   19s]   File "./sre_parse.py", line 599, in _parse
[   19s] re.error: bad character range t-n at position 18

The reason is an unexpected hyphen in the extras specifier of a Requires-Dist: line. See pypa/hatch#801