42 Commits

Author SHA1 Message Date
bortolussi
844bb9c0a2 Fix the doc builds
Make sure the 'python' docs conf file is not overridden by the common
conf.

eng/toolchain/gnatcoll-bindings#2
2023-12-06 14:04:13 +03:00
Nicolas Setton
1a230fb6c1 U515-001 gracefully handle the absence of a static python lib
Fix a Python error that occurred when the static lib was not
found.

Change-Id: I02096a913e03714a23bf25935cf056e332452dd5
2021-05-26 10:56:34 +01:00
Nicolas Boulenguez
aeea734354 Use ADAFLAGS CFLAGS CPPFLAGS LDFLAGS if they exist in the environment 2021-04-05 15:56:56 +02:00
Nicolas Boulenguez
1adbba0a53 python.gpr: compute one External_As_List instead of many Split.
This is more efficient and readable.
2021-04-05 15:55:44 +02:00
Nicolas Boulenguez
53d37d3ed4 Removed unused OS_Kind external variable.
The related part of setup.py is still required by the imported
gnatcoll.gpr.
2021-04-05 15:55:13 +02:00
Nicolas Boulenguez
bd6661cae4 In library projects, only set version in the relocatable case 2021-04-05 15:54:31 +02:00
Nicolas Boulenguez
92da3a0af8 Explicitly mark projects with the library qualifier 2021-04-05 15:46:19 +02:00
Adrien Boulanger
7a272ebf03 U305-023: Defensive code for the GIL
Trying to ensure/release the GIL when there is no interpreter will
raise an exception.

Change-Id: I4f85bfbfdd799b906848d2038b52825c4c709e54
2021-03-19 12:34:13 +01:00
Vadim Godunko
f83e315dfb T109-039 Protect calls to Python C API.
Change-Id: I96bd6fb7a4c7c5340b5c0f8d82ecb34ff682540e
2021-02-23 11:04:09 +03:00
Dimitri Kokkonis
d0e71781e5 Migrate to Sphinx 3.2 and Python 3. T421-010
Change-Id: I96620da19b01be4b8a63de05ac4be8c6cb6a63c4
2020-12-08 16:28:28 +01:00
Nicolas Setton
911e57fe44 TB10-016 do not link with the python .la in shared mode
Refinement on the previous change: do not pass the Python
static library to the linker if we are in the mode where
we are using the Python shared library.

Change-Id: I05a19d0f69a492106d04e612f299ea32ceeae1ea
2020-11-19 09:41:04 +00:00
Nicolas Setton
6e9769eb5a TB10-016 Make gnatcoll_python.gpr relocatable
Add a project variable to indicate the path to the libpython*.la,
and use this variable to find this when building.

Copy the .la file to the installation destination,
and use the variable to make sure the project generated by gprinstall
finds it.

Change-Id: Ic145f14339091ecb3bf6f10af14916de9fa176d4
2020-11-18 15:55:55 +00:00
Fabien Chouteau
c8425159d5 gnatcoll_*.gpr: rename external GNATCOLL_BUILD into GNATCOLL_BUILD_MODE
To avoid conflict with installed gnatcoll.gpr where GNATCOLL_BUILD means
library type.

Part of S709-037.

Change-Id: I5a0164505bee8e4a93409615e7a9d3b9a85c02f3
2020-09-10 18:41:55 +02:00
Fabien Chouteau
5262835c42 gnatcoll_*.gpr: introduce the GNATCOLL_BUILD external
Like for gnatcoll_core, these externals allow gnatcoll_*.gpr to be used
from a project that defines the BUILD external in an incompatible way.

Part of S709-037.

Change-Id: I409695393fb40d301e280a3f5ac7018e9d7bc81b
2020-08-25 16:07:04 +02:00
Pierre-Marie de Rodat
b99a330afa Import documentations from the obsolete GNATcoll monorepo
Change-Id: I7cb976c1224d75f93f588240f70af42b4674a64c
TN: R329-046
2020-02-10 15:31:10 +01:00
Nicolas Roche
3b0c95c789 Revert addition of Python 3.x in python subdirectory
Python 3.x support will be located in python3

Part of S821-014

Change-Id: Ied856be8d18d1017015cd1f2d555c62519c89012
2020-02-07 10:26:11 +01:00
Nicolas Boulenguez
df6adc1367 python3 compatibility: integer types
Document that python3 removes PyInt functions.
Provide PyLong functions, available in all versions.
Add missing python3 PyInt_FromSize_t wrapper when python3 is in use.

Part of S821-014

Change-Id: I4f7cbe196be3b9f84f3d199f10f3740a844edf79
2020-02-07 10:26:06 +01:00
Nicolas Boulenguez
f7a390af96 python3 compatibility: string types
PyUnicode_FromString and _AsEncodedString are available as macros
since python2.6.

Part of S821-014

Change-Id: I89d35e530e146cc4251dbf877f37def003629dc8
2020-02-07 10:26:01 +01:00
Nicolas Boulenguez
533a2c3a96 python3 compatibility: PyObject structure members.
These macros are required for Python3, and available since python2.6.

Part of S821-014

Change-Id: I72dc83e6c9ba78e0586b4f3fcce86461093864b4
2020-02-07 10:25:58 +01:00
Nicolas Boulenguez
f47dbd0271 python3 compatibility: file interface
Document that python3 removes PyFile_FromString,
but provide a wrapper if python3 is in use.

Part of S821-014

Change-Id: I2aeeef23be667810a39004d028f16c60889e9656
2020-02-07 10:25:54 +01:00
Nicolas Roche
b508bcf68b Ensure setup.py for gnatcoll Python binding works with 3.x
Part of S810-004

Change-Id: I90e4bc9086cb704685cf7466d2433c36f7bfd2ee
2019-11-22 17:33:13 +02:00
Raphaël AMIARD
2c7b8c2255 S502-010: Make PyTypeObject a subtype of PyObject
This is much closer to the C side structure of things (eg, a
PyTypeObject is a PyObject).

Change-Id: I49a56d9c69458de9ad02ce51ce4c360b90396c39
2019-11-05 19:23:19 +01:00
Nicolas Boulenguez
3706876412 Merge 3 python statements python in Python.Set_Default_Console.
Py_Single_Input is limited to one statement and says:
SyntaxError: multiple statements found while compiling a single statement

This fixes a non-fatal error in gnat-gps.

Change-Id: Ic9a8ea4d668cd9e1e5d9cbc458cc8217ecb41d0a
2019-09-05 12:34:04 +02:00
Vasiliy Fofanov
c10b42bedf Document that only Python 2 is supported. Minor script tweak. S808-025
Change-Id: I9e8c3a4596fc66c93b453fa0d84c6a6370afded3
2019-08-12 12:27:51 +02:00
Vadim Godunko
8160d1d95a S402-005 Public subprogram to obtain backtrace of Python execution.
Change-Id: Iadae6bf6fac7553bbf16aa9af347acad6f1fdfcf
2019-04-04 20:14:37 +03:00