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.5 required=3.0 tests=BAYES_05,FORGED_GMAIL_RCVD, FREEMAIL_FROM,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Received: by 2002:a0c:ca0a:0:b0:4b9:ef84:afc3 with SMTP id c10-20020a0cca0a000000b004b9ef84afc3mr2259637qvk.57.1668180051347; Fri, 11 Nov 2022 07:20:51 -0800 (PST) X-Received: by 2002:ac8:1384:0:b0:3a5:591e:a60a with SMTP id h4-20020ac81384000000b003a5591ea60amr1725655qtj.309.1668180051169; Fri, 11 Nov 2022 07:20:51 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.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 07:20:50 -0800 (PST) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=46.15.69.199; posting-account=uulyKwoAAAA86DO0ODu--rZtbje8Sytn NNTP-Posting-Host: 46.15.69.199 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: Egil H H Injection-Date: Fri, 11 Nov 2022 15:20:51 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 2665 Xref: reader01.eternal-september.org comp.lang.ada:64603 List-Id: On Friday, November 11, 2022 at 12:28:50 PM UTC+1, Rego, P. wrote: > > You could start with something like this: > Thanks Dmitry! > > project Python is > > for Languages use ("Python"); > > package Compiler is > > for Driver ("Python") use > > "C:/GNAT/2021/libexec/gnatstudio/gnathub/share/gnathub/python/python.exe"; > > for Required_Switches ("Python") use ("-m", "compileall"); > > end Compiler; > > package Naming is > > for Body_Suffix ("Python") use ".py"; > > end Naming; > > end Python; > Got it. I didn't include naming and compiler options. > Now it runs, but it asks for a linker > > gprbuild: no linker specified and no default linker in the configuration > (where idk if it makes sense since we wont be linking to an object) > > For a no error py it "compiles" clean (ok I'll call compilation, but we understand > it's not "the compilation"), but in compilation log it doesn't show the warnings > that are included in the edit window with the opened file. If I include > an error, it shows in the log where the error happened, but doesn't show in > the locations. GPS will be not very useful this way. There are a couple of project level attributes you can play around with: for Object_Generated("Python") use "False"; and for Objects_Linked("Python") use "False";