[Top][All Lists]

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

Re: [Bug-apl] Python Interface

From: Dr . Jürgen Sauermann
Subject: Re: [Bug-apl] Python Interface
Date: Mon, 17 Jun 2019 11:40:44 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:60.0) Gecko/20100101 Thunderbird/60.6.1


I haven't tried Python 2.7 but it may work. I followed the instructions in


I personally find Python 2.7 somewhat odd, so I never considered it.

According to ./configure  --help:
  --with-python           enable to build python extension lib_gnu_apl.so

so --with-python is the correct approach. Regarding the python version, you can

change line 184 in src/Makefile.am:

lib_gnu_apl_la_CXXFLAGS += -I/usr/include/python3.4m

to reflect your Python version and then autoreconf and ./configure --with-python again,
or something like:

CXX_FLAGS="-I/usr/include/python3.4m" ./configure

Best Regards,

On 6/17/19 6:22 AM, Christian Robert wrote:
If I configure with: --with-libpython_apl
it says: configure: WARNING: unrecognized options: --with-libpython_apl

If I configure with: --with-python
it fail in #include <Python.h>   (no such file or directory)
probably because of hard coded "-I/usr/include/python3.4m" which does not exist on my system.

this is because it try to compile with python3.4m  but on my system (fedora30)
the installed pythons are:

[xtian@FC-30:/home/xtian/gnuapl] $ python -V
Python 2.7.16


[xtian@FC-30:/home/xtian/gnuapl] $ python3 -V
Python 3.7.3

You can probably invoke python3-config as in:

[xtian@FC-30:/home/xtian/gnuapl] $ python3-config --help
Usage: /usr/bin/python3.7m-x86_64-config --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--abiflags|--configdir

[xtian@FC-30:/home/xtian/gnuapl] $ python3-config --includes
-I/usr/include/python3.7m -I/usr/include/python3.7m

[xtian@FC-30:/home/xtian/gnuapl] $ python3-config --libs
-lpython3.7m -lcrypt -lpthread -ldl  -lutil -lm

to figure-out where are the includes dirs and may be other dirs.

I suppose this interface is NOT intended for python2 at all, and it's fine with me.


On 2019-06-16 15:42, Dr. Jürgen Sauermann wrote:

in following a suggestion by Kumar Ramanathan, I have created a Python interface for GNU APL.
With that interface you can execute APL code, create APL defined functions, etc.  from Python.
Similar to *libapl* for C/C++ or to the Erlang interface.

See *README-10-python* for details.

*SVN 1167*.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]