The testsuite is now clean with either python2.7 or python3.2.
Support for older versions of python has not changed, so we should
still be compatible with 2.6
L619-031
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@191207 936e1b1b-40f2-da11-902a-00137254ae57
We now longer create and call our custom _gnatcoll class to redirect
sys.stdout, sys.stderr and sys.displayhook. This method was fragile
in the face of multi-tasking (L607-001). It was also hiding too
much in fact, since it was often confusing for users that their
"print" statements did not generate any output (L620-027).
Instead, we now compile with special flags with Py_CompileString,
so that python does not generate the call to displayhook.
Because of this, we cannot use __builtins__._ to look at the result
of the previous command, but we get this output directly from
PyEval_EvalCode when the code is an expression.
One of the changes for users is that we can no longer execute a
string containing a class or function definition or import statement,
and expect to get its output (but in fact there is none, so the code
was suspicious in the first place).
A few other optimizations in Run_Command (logging directly using the
traces module, rather than through the console class), and avoid
string manipulation when possible.
Provide support for logging exception messages in the log file, to
help debug scripts.
Finally, this code is in preparation for support of python3 (L619-031)
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@191180 936e1b1b-40f2-da11-902a-00137254ae57
The new implementation does more work directly in C, which also makes
it easier to add support for python 3.
(configure): new switch --with-python-exec
to force the use of python 3
Support for python3 now compiles, but resulting executables still do not
work properly yet.
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@191120 936e1b1b-40f2-da11-902a-00137254ae57
compiling with -Wall
(configure): use python-config --includes rather than --cflags, since
the later also provides all the compilation flags used to build
python itself, and which might not be compatible with the gcc version
we use for gnatcoll. For instance, on linux python is now built with
-fstack-protected, which apparently requires special linker switches
as well.
(configure): export the include and lib flags needed to build python
C files, in case the user needs to build some. L217-023
(configure): detect whether readline is supported on the system. This
is currently unused by GNATCOLL, but is cheap to test and might be
useful to users (for this, its result is exported in gnatcoll.gpr
too). Also L217-023
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@185922 936e1b1b-40f2-da11-902a-00137254ae57
In particular, this function did not exist in python 2.5, installed on
kani where the CRM runs
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@175303 936e1b1b-40f2-da11-902a-00137254ae57
The previous hack was that PyString_Check also returns True for unicode
objects, but then the functions PyString_AsString always returned NULL
for a unicode object. So now PyString_Check only returns true for strings,
and a new function PyUnicode_Check was added.
(PyBaseString_Check): new function, with the old behavior of PyString_Check
(PyUnicode_*): new functions
For K616-011
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@175218 936e1b1b-40f2-da11-902a-00137254ae57
Those properties basically provide a simpler syntax around two
setter() and getter() functions (or possibly just one to make the
property read-only or write-only).
JB17-022
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@167236 936e1b1b-40f2-da11-902a-00137254ae57
Python now provides a better function, which preserves the usual python
semantic. This is more portable than our previous approach.
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@167112 936e1b1b-40f2-da11-902a-00137254ae57
(Nth_Arg): can now accept lists as parameters to script functions,
in addition to the usual simple types
JB15-028
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@167055 936e1b1b-40f2-da11-902a-00137254ae57
needed to better handle calling python functions from Ada when they
return a "bool"
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@152423 936e1b1b-40f2-da11-902a-00137254ae57
Add support for PyFloat
Add Py_Main function to start the python interpreter
git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@132647 936e1b1b-40f2-da11-902a-00137254ae57
python it doesn't seem to be included by default, which prevents
compilation of this file (fails with Python 2.3.4)
git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@126467 936e1b1b-40f2-da11-902a-00137254ae57
No source file has changed, but they were moved so that they are all under src/
now (and possibly subdirectories for those sources that depend on optional
external libraries).
We now support building both static and relocatable libraries at the same time,
using separate lib and obj directories to avoid conflicts. Also both can be
installed in the same prefix, the choice between the two can be done by the
user application
git-svn-id: svn+ssh://svn.eu/Dev/trunk/gps@113225 936e1b1b-40f2-da11-902a-00137254ae57