File: python

package info (click to toggle)
libgnatcoll-python 21.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,088 kB
  • sloc: ada: 14,431; python: 1,493; ansic: 1,378; makefile: 173; sh: 94
file content (32 lines) | stat: -rw-r--r-- 619 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh
set -C -e -f -u

cd "$AUTOPKGTEST_TMP"

cat > proc.adb <<EOF
with Ada.Command_Line;
with Ada.Text_IO;
with GNATCOLL.Python;
procedure Proc is
begin
   GNATCOLL.Python.Py_SetProgramNAme (Ada.Command_Line.Command_Name);
   GNATCOLL.Python.Py_Initialize;

   Ada.Text_IO.Put_Line (GNATCOLL.Python.PyString_AsString
                         (GNATCOLL.Python.PyObject_Str
                          (GNATCOLL.Python.Py_None)));

   GNATCOLL.Python.Py_finalize;
end Proc;
EOF

cat > proj.gpr <<EOF
with "gnatcoll_python.gpr";
project Proj is
   for Main use ("proc.adb");
end Proj;
EOF

gprbuild -v proj.gpr

./proc