On 05/19/2017 11:51 AM, Martin Liška wrote:
Hello.

I'm sending final (slightly updated) version of the script. I'm also adding 
Jakub,
because I remember he's got another regex patterns he's using for review 
process?
Would it be fine to just remove the old *.sh script, or is it preferred to have
them both living next to each other for some time?


I'd like to keep the old script around for a while, to make comparison between the two scripts easier.

Thanks,
Martin


check_GNU_style.py


#!/usr/bin/env python3
#
# Checks some of the GNU style formatting rules in a set of patches.
#
# This file is part of GCC.
#
# GCC is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 3, or (at your option) any later
# version.
#
# GCC is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with GCC; see the file COPYING3.  If not see
# <http://www.gnu.org/licenses/>.  */
#
# The script requires following python packages
# (can be installed via "pip 3 install"):

pip3 (there's a space inbetween pip and 3)

#   unidiff
#   termcolor


I'd prefer a formulation that can be copy-pasted to the command line, f.i.:
...
# The script requires python packages, which can be installed via pip3
# like this:
# $ pip3 install unidiff termcolor
...

I'm not sure if it's possible in python, but it would be even better to detect the missing packages at runtime and print a message explaining how to install the missing packages.


Anyway, using your explanation I now managed to install the dependencies and run the script. [ Earlier I ran into the missing package error, googled the package, found https://pypi.python.org/pypi/unidiff, ran the suggested install line '$ pip install unidiff', and found that the script still was not working. ]

Thanks,
- Tom

Reply via email to