To build a Windows DLL we do not want a single __declspec(dllexport) as
in this case only the routines marked with this attribute will be
exported from the DLL.
For P120-046.
Change-Id: I02ca24cebe2740728bfe6584ea9bbff1e4a9c86e
for OB24-013
Add traces to help investigate python issues (list all callbacks from
python to Ada in the traces)
Change-Id: I38c7680a82a520f89f53f54ab06fe7fe3adbe25b
better than PyObject_TypeCheck for classes. Found in the
context of MA04-005.
git-svn-id: svn+ssh://svn.eu.adacore.com/Dev/trunk/gps@219329 936e1b1b-40f2-da11-902a-00137254ae57
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