Commit Graph

20 Commits

Author SHA1 Message Date
Benjamin Dauvergne 4a880977d1 Remove ID-WSF 1.0, 2.0 and WS-* support (#56644)
It has been deprecated for a long time.
2021-09-11 18:54:41 +02:00
Benjamin Dauvergne e5ad4b1702 misc: clear warnings about class_init signature using coccinelle
$ spatch --in-place --sp-file add-second-arg-to-class-init.cocci `git grep -l -C1 ^class_init \*.c`
	$ sed -i 's/\*unused\>/*unused G_GNUC_UNUSED/' `git grep -l 'void \*unused'`
2020-03-26 22:52:49 +01:00
John Dennis 3d9d58d52c Make more Python scripts compatible with both Py2 and Py3
While porting other Python code in the repo to run under Py3 (as well
as Py2) it was discovered there were a number of other Python scripts
which also needed porting. However these scripts are never invoked
during a build so there was no easy way to test the porting work. I
assume these scripts are for developers only and/or are
historical. Because there was no way for me to test the porting
changes on these scripts I did not want to include the changes in the
patch for the Py3 porting which fixed scripts that are invoked during
the build (the former patch is mandatory, this patch is optional at
the moment). I did verify the scripts compile cleanly under both Py2
and Py3, however it's possible I missed porting something or the error
does not show up until run-time.

Examples of the required changes are:

* Replace use of the built-in function file() with open().  file()
  does not exist in Py3, open works in both Py2 and Py3.  The code was
  also modified to use a file context manager (e.g. with open(xxx) as
  f:). This assures open files are properly closed when the code block
  using the file goes out of scope. This is a standard modern Python
  idiom.

* Replace all use of the print keyword with the six.print_()
  function, which itself is an emulation of Py3's print function. Py3
  no longer has a print keyword, only a print() function.

* The dict methods .keys(), .values(), .items() no longer return a
  list in Py3, instead they return a "view" object which is an
  iterator whose result is an unordered set. The most notable
  consequence is you cannot index the result of these functions like
  your could in Py2 (e.g. dict.keys()[0] will raise a run time
  exception).

* Replace use of StringIO.StringIO and cStringIO with
  six.StringIO. Py3 no longer has cStringIO and the six variant
  handles the correct import.

* Py3 no longer allows the "except xxx, variable" syntax, where
  variable appering after the comma is assigned the exception object,
  you must use the "as" keyword to perform the variable assignment
  (e.g. execpt xxx as variable)

* Python PEP 3113 removed tuple parameter unpacking. Therefore you can
  no longer define a formal parameter list that contains tuple
  notation representing a single parameter that is unpacked into
  multiple arguments.

License: MIT
Signed-off-by: John Dennis <jdennis@redhat.com>
2018-07-24 11:03:09 +02:00
John Dennis 87040110ed Use python interpreter specified configure script
The configure script allows you to specify the python interpreter to
use via the --with-python option. There were several places where the
python interpreter was implicity invoked without using the specified
version. This can create a number of problems in an environment with
multiple python versions as is the case during the transition from
Python 2 to Python 3. Python 2 is not compatible with Python
3. Lasso's Python code is supposed to be compatible with both
versions. But during the build and when running the unit tests it is
essential the same interpreter be used consistently otherwise you can
have problems.

This patch assures whenever python is invoked it does so via the
$(PYTHON) configuration variable.

What about shebang lines (e.g #/usr/bin/python) at the top of scripts?
Python PEP 394 (https://www.python.org/dev/peps/pep-0394/) covers
this. Basically it says if a script is compatible only with Py2 the
shebang should be #/usr/bin/python2, if only compatible with Py3 the
shebang should be #/usr/bin/python3. However, if the script is
compatible with both versions it can continue to use the
compatible with both Py2 and Py3.

License: MIT
Signed-off-by: John Dennis <jdennis@redhat.com>
2018-07-24 11:03:09 +02:00
Benjamin Dauvergne 8484e7a065 Add tool gitlog-to-changelog 2014-08-28 16:00:13 +02:00
Simo Sorce 3a6b2fdee7 Fix license boilerplates
Instad of referring to an old FSF address, point the reader to the FSF
website where the latest licenses and addresses are published.

Signed-off-by: Simo Sorce <simo@redhat.com>
2013-12-03 21:55:06 +01:00
Benjamin Dauvergne cf1a4a79b0 toosl/git-version-gen: use a dot to separate the commit string from the regular version 2013-09-27 16:19:28 +02:00
Benjamin Dauvergne e70a5746d5 tools/git-version-gen: keep the g before the git commit number 2013-09-27 12:20:16 +02:00
Benjamin Dauvergne 57435048a0 configure: generate version number from git revision between tagged release
The script git-version-gen is copied from the autoconf project.
2013-05-15 11:28:25 +02:00
Benjamin Dauvergne a6d33dd5fe [tools] add a repository for semantic patches as reference 2010-10-11 18:46:39 +02:00
Benjamin Dauvergne dbda2d11c0 [Core] move format-suppressions.py to tools directory 2010-07-21 13:57:03 +00:00
Benjamin Dauvergne b773217b54 Tools: add check-makefile.sh script to tools 2010-06-12 00:43:31 +00:00
Benjamin Dauvergne ca495cce42 Tools: add usage statement to check-lasso-sections.py 2010-04-06 13:11:44 +00:00
Benjamin Dauvergne 6924bffe21 Tools: add script to check for missing functions in lasso-sections.txt 2010-03-27 16:51:55 +00:00
Benjamin Dauvergne 9f57d30ebc Tools: add script to generate a listing of Lasso ABI
* tools/api.py:
   use parser from the binding generator to output a list of symbols
 * bindings/bindings.py;
   add private flags to not clobber 'private' fields of structures or
   methods not exported in bindings like _get_type.
2010-01-14 16:18:42 +00:00
Benjamin Dauvergne 9ed0670e48 * Remove ending blanks 2008-09-12 15:06:58 +00:00
Frédéric Péters 76794d2bd0 changed GList* of xmlNode* annotation, to include the * 2007-11-03 21:23:27 +00:00
Frédéric Péters 951e05e46e fixed indentation in generation script 2007-09-21 17:01:10 +00:00
Damien Laniel 18147f1517 added ModifyResponse as custom namespace 2007-08-06 16:39:56 +00:00
Frédéric Péters 26e7ad47d5 added script to generate idwsf2 low level classes to repository 2007-07-30 09:26:02 +00:00