comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Running Python code from GPRBuild (Calling from GNAT Studio)
Date: Thu, 10 Nov 2022 22:57:59 +0100	[thread overview]
Message-ID: <tkjs57$1abq$1@gioia.aioe.org> (raw)
In-Reply-To: 7d578e15-d21e-4eae-a519-d98c1bf1145cn@googlegroups.com

On 2022-11-10 20:25, Rego, P. wrote:

> I'm trying to compile some Python files from an Ada project (in an integration which will consist of Ada, Python and Rust).

Python is not a compiled language.

1. If you want to create a Python module in a form of a dynamically 
linked library, you must use C or Ada for that.

2. If you rather meant pre-compiled binary code (*.pyc). Python creates 
them by py_compile command. See

     https://docs.python.org/3/library/py_compile.html#py_compile.compile

There is also command-line interface:

     https://docs.python.org/3/library/compileall.html

You possibly could configure gpr to call compileall on *.py files, 
though it would make no sense to me.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

  reply	other threads:[~2022-11-10 21:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-10 19:25 Running Python code from GPRBuild (Calling from GNAT Studio) Rego, P.
2022-11-10 21:57 ` Dmitry A. Kazakov [this message]
2022-11-11 10:25   ` Rego, P.
2022-11-11 11:04     ` Dmitry A. Kazakov
2022-11-11 11:28       ` Rego, P.
2022-11-11 13:30         ` Dmitry A. Kazakov
2022-11-11 13:40           ` Dmitry A. Kazakov
2022-11-11 18:12             ` Rego, P.
2022-11-11 18:08           ` Rego, P.
2022-11-11 19:50             ` Dmitry A. Kazakov
2022-11-11 21:34               ` Rego, P.
2022-11-11 15:20         ` Egil H H
2022-11-11 18:14           ` Rego, P.
2022-11-11 20:05             ` Egil H H
2022-11-11 21:24               ` Rego, P.
2022-11-12 17:40 ` Stephen Leake
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox