[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

request for help with Python in GPS


I would welcome help or advices about a tricky problem with gnat-gps,
the (hopefully) last key step in the gnat-6 migration.

The current packaging in the monotone server builds GPS-6.1.1 (aka
GPL-2015, not GPL-2016). You will need to manually download and repack
the sources from the libre.adacore.com website, as the Adacore uscan
redirector is broken (patch pending).
# wget http://mirrors.cdn.adacore.com/art/564b3dfac8e196b040fbcc14
# mv 564b3dfac8e196b040fbcc14 gps-6.1.1-src.tar.gz
# mtn checkout -r h:org.debian.gnat-gps
# cd org.debian.gnat-gps
# mk-origtargz ../gps-6.1.1-src.tar.gz --repack --compression=xz
# cd ..
# sha512sum -b gnat-gps_6.1.1.orig.tar.xz
should match 5f98ccf48cf807fdd581aba4f182f7b438ae0a26fa67cb2423244d161a11d73620c2e3fdc089181a9222d5329e6680ace9ec8fa14a979d302d88ba0fa315db89
# tar xf gnat-gps_6.1.1.orig.tar.xz
# mv org.debian.gnat-gps/* gps-6.1.1-src
# rmdir org.debian.gnat-gps
# cd gps-6.1.1-src
# debuild

The produced executable freezes right after startup.  Without
debian/patches/python_2_to_3_type.diff, the Python startup scripts
calling make_interactive() fail, but the program does not freeze.

I suspect this line of ~/.gps/log* to be relevant.

CONSTRAINT_ERROR : gnatcoll-scripts-python.adb:820 access check failed

In GPS, some essential GUI callbacks are written in Python, and run
via an interpreter embedded in libgnatcoll . The Python code itself
calls primitives from the Python module named GPS, implemented in Ada
and documented in docs/users_guide/gps/__init__.py.

For new packages, Python3 is recommended, and libgnatcoll supports it,
so libgnatcoll embeds a Python3 interpreter instead of the default
Python2 interpreter. It seemed a good idea then :-)

The following error is probably unrelated and should be fixed by last
commit in org.debian.libgnatcoll.
SyntaxError('multiple statements found while compiling a single statement', ('<string>', 1, 28, 'sys.stdout = sys.__stdout__\n'))

Reply to: