403 Commits

Author SHA1 Message Date
Anthony Leonardo Gracio
11672bc929 Update copyright year for GS sources
(no-issue-check)
2026-01-05 12:41:13 +00:00
Vadim Godunko
14a6978bb9 Add dependency from vss_os.gpr
(cherry picked from commit efcc8e4994)
2025-09-19 10:04:04 +00:00
Vadim Godunko
cce69b3b56 Remove duplicate dependency from gtkada. 2024-07-16 06:04:02 +00:00
Pierre-Marie de Rodat
9d5d31d7be Allow gnatbench to stub the dependency over GNATCOLL.Python
Introduce a simple unit to define a type used to lock Python's GIL.
GNATbench sources will only have to stub it.
2024-06-25 15:54:01 +00:00
Nicolas Setton
74f2e06ba1 Fix launch of GNAT Studio from Python virtualenvs.
Right now, when launched from a virtualenv, GNAT Studio
cannot function - it cannot find gi and other Python libs.

This is because Python attempts to finds packages relative to
the "python" executable by default. Instead, make it find
the location of Python libraries relative to "gnatstudio".

Fixes #163.
2023-11-30 09:53:21 +00:00
boulanger
b75b66fe4e Fix local run of testsuite on Windows
add_dll_directory will print the new directory in stdout which
will make the GS testsuite fails.
2023-02-09 12:12:16 +01:00
Anthony Leonardo Gracio
41c30ab309 Update copyright year (no-tn-check)
Change-Id: Ie2cf22f9729f30d2228572a7296c23889be4c563
2023-01-03 11:39:28 +01:00
Adrien Boulanger
8d588bfb0c S712-022: Python leaks related to FileLocation
Each FileLocation was leaking a File: they were keeping a pointer
to File without using any proxy to release them.
Break the dependency and only create the File from the FileLocation
when needed.

Add a test.

Change-Id: I1df713a7c0e6cc54f7c4912b803247b3189dcd92
2022-04-11 15:54:11 +00:00
Vadim Godunko
7e48a999ba V124-002 Rename GPS_ environment variables to GNATSTUDIO_.
Change-Id: I823ad31339e0a111cc76b81d8ff5765674c6983f
2022-01-24 13:48:59 +03:00
Vadim Godunko
cf1fe73a82 V124-002 Replace GNAT.OS_Lib by VSS.Environment.
Change-Id: I2e5ad0c81bda2109c8032a004dc3bb89c8959980
2022-01-24 13:37:11 +03:00
Vadim Godunko
4326d10823 V124-002 Allow to specify few paths to lookup DLLs.
Change-Id: I320c6a2866f2d02d8f12b610d302e297debcac81
2022-01-24 12:05:54 +03:00
Nicolas Setton
2b886cac44 UC20-014 Expect Python to be under share/gnatstudio/python
... and expect this to be a full Python installation, meaning
there is no longer the need for the hack on "Program_Name".

Depends-On: Ie1db8e10bc57c4fd0cccde5b5da30cac45209ade
Change-Id: Iaf89c8b7c51bad0c2d57199b144a13a346bb9cce
2022-01-17 15:56:18 +00:00
Adrien Boulanger
3ac9853c7e UC15-039: add_dll_directory is windows only
Change-Id: Id862ef6aff7c6c6aab8dc7d159b74e69f3b41a8e
2022-01-10 15:09:38 +00:00
boulanger
81c22c0885 UC15-039: load dll in GPS_GTKDLL if set
This is needed for the GS spawn via ancr because gtk dll needed by
python4gnatstudio are not located in the same directory.

Change-Id: I04725fd35562cc8ec64a2a25cf1d6e686c93de35
2022-01-10 15:09:38 +00:00
Adrien Boulanger
295f334e84 U914-005: Transition from python 3.7 to 3.9
- Fix "is not" warnings
- ReadPlist has been removed
- Fix crash related to wrong __repr__ definition
- Add defensive GIL lock in the hooks
- Following the parso/jedi bumped, update the python completion
to use the new API.

(no-precommit-check)

Change-Id: I2e027361b17d0f0101763901ba3064b204a56799
2022-01-10 15:09:38 +00:00
Anthony Leonardo Gracio
af4c8f2d41 Update copyright year
(no-tn-check)
(no-precommit-check)

Change-Id: Id71d3f84cd6ab219a37821da1460038f4eea525c
2022-01-03 15:09:31 +01:00
Nicolas Setton
28d7eb1336 UC14-048 Pass 'gnatstudio' as Python "Program_Name"
... unless we're in development mode and using "GPS_PYTHONHOME".

Add a block of explanatory comment.

Change-Id: I7ed3856f20bb795a3e812454af2913dadae5ca16
2021-12-20 13:00:28 +00:00
Nicolas Setton
1a42b2d60f U330-020 Enforce utf8 Python source encoding
Python source files should be encoded in utf-8 by default, but on Windows
our Python interpreter uses cp1252 instead. Adjust this by overriding the
function that returns the encoding.

Change-Id: Ie52f0e933d299ba858fc7a1c5137b15a9a543375
2021-03-30 07:00:35 -04:00
Adrien Boulanger
a702e282dd TC16-004: Replace __cmp__ by the full comp/sort API
__cmp__ is not supported by python 3

Change-Id: I0ac93a54c60a583357cc311a6212f58d753ca1eb
2021-03-03 17:33:56 +01:00
Vadim Godunko
dc4569feaf T109-039 Fix compilation failure in dev env
Change-Id: I9cbbb00a0e454d16c4660c78b6384a864e5445ba
2021-03-03 09:06:07 +03:00
Vadim Godunko
d75f5ce0a8 T109-039 Protect calls to Python C API.
Change-Id: I53fa492609cf7c79839992265aa1d341347ca070
2021-02-22 13:28:54 +03:00
Vadim Godunko
c39299441a Remove commented out line.
(no-tn-check)

Change-Id: I554432a5687fb5cb3645d25712b9309e44baaca9
2021-02-22 13:28:54 +03:00
Anthony Leonardo Gracio
63c2e9d9c9 Update copyright year
(no-tn-check)
(no-precommit-check)

Change-Id: I50abdaba131d76d914f1df9a53f013ec8f48ca68
2021-01-11 17:22:37 +01:00
Adrien Boulanger
172aaf4eaf TA14-030: Python coverage in GS
Monitor the new environment variable GNATSTUDIO_PYTHON_COV.
This variable must be set to the name of the directory being
tested.

Add --pycov switch in the testsuite CLI.

Create a pycov_data repository containing:
- preferences in the form of .coveragerc
- pycov_startup.xml: when put in $GNATSTUDIO_HOME\startup.xml
enabled all the plugins.
- all the generated file in the form of .coverage.${test_name}

When all the file are generated, run:
$ coverage combine # ignore this if there is only one .coverage*
$ coverage report
$ coverage html    # optional

Change-Id: I4b45243924d939ede5b885ff86541a6d70571b0c
2020-11-04 14:42:43 +01:00
Andry Ogorodnik
fd3caf3477 S903-025 GS acronym has been added into Python API.
no-precommit-check

Change-Id: I785d68130051e8d12f4a6b627cb1ad5b48f903e5
2020-11-04 11:05:12 +01:00