summaryrefslogtreecommitdiff
path: root/scripts/prohibit-duplicate-header.py
Commit message (Collapse)AuthorAgeFilesLines
* build: only support python3 binaryDaniel P. Berrangé2019-12-041-3/+1
| | | | | | | | python2 will be end of life by the time of the next libvirt release. All our supported build targets, including CentOS7, have a python3 build available. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
* scripts: speedup prohibit-duplicate-headerJán Tomko2019-11-221-0/+4
| | | | | | | | | | | Running regular expressions with capture groups is expensive. Bail out early if the line does not start with a '#'. This reduces the runtime of the check by two thirds. Signed-off-by: Ján Tomko <jtomko@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
* build-aux: rewrite duplicate header checker in PythonDaniel P. Berrangé2019-11-181-0/+56
As part of an goal to eliminate Perl from libvirt build tools, rewrite the prohibit-duplicate-header.pl tool in Python. This was a straight conversion, manually going line-by-line to change the syntax from Perl to Python. Thus the overall structure of the file and approach is the same. Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>