From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Received: by 2002:a0c:ab83:0:b0:4c6:dd9:586c with SMTP id j3-20020a0cab83000000b004c60dd9586cmr2898771qvb.40.1668190353241; Fri, 11 Nov 2022 10:12:33 -0800 (PST) X-Received: by 2002:ac8:6690:0:b0:3a5:933:e8a9 with SMTP id d16-20020ac86690000000b003a50933e8a9mr2398428qtp.676.1668190353058; Fri, 11 Nov 2022 10:12:33 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 11 Nov 2022 10:12:32 -0800 (PST) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=152.249.156.27; posting-account=TRgI1QoAAABSsYi-ox3Pi6N-JEKKU0cu NNTP-Posting-Host: 152.249.156.27 References: <7d578e15-d21e-4eae-a519-d98c1bf1145cn@googlegroups.com> <673c0ad1-dd6d-4cc6-a191-3bcff7f1c5ddn@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Running Python code from GPRBuild (Calling from GNAT Studio) From: "Rego, P." Injection-Date: Fri, 11 Nov 2022 18:12:33 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:64605 List-Id: > Note that Linker does not take language e.g. ("Python") you just write: > package Linker is > for Driver use "pyinstaller.exe"; did that... got some more ugly messages gprbuild -d -PP:\Gnat\testpy.gpr P:\Gnat\src\Analysis.py Compile [python] analysis.py gprbuild: raised ADA.ASSERTIONS.ASSERTION_ERROR : Invalid Id 0 [C:\GNAT\2021\bin\gprbuild.exe] 0x8db0d6 0x648431 0x648671 0x4832bc 0x492553 0x49260e 0x4932d4 0x413bd5 0x948929 0x401423 0x40113b [C:\WINDOWS\System32\KERNEL32.DLL] 0x7ffc052b7032 [C:\WINDOWS\SYSTEM32\ntdll.dll] 0x7ffc05e6269f [2022-11-11 15:10:07] process exited with status 4, elapsed time: 04.03s and now I oversimplified the Analysis.py to import os import sys print('test') maybe I'm pushing harder than should (trying to compile/run/whatever Python from GPS), but still curious. > You have to tinker a bit since there is no object files to feed the > Linker. Maybe you could sell it *.py as an "archive" (static library). > Whatever... (:-)) Who knows :p