Ich habe hier ein etwas verzwicktes Problem mit dem Lunatic Python Modul (eine Brücke zwischen LUA und Python): Ich kann es leider nicht installieren, da ich nicht weiss wie ich den Include Pfad zu den Lua50 headern in der "setup.py" einstellen soll.
Momentane fehlermeldungen beim bauen sehen so aus:
Code: Alles auswählen
$ make
python setup.py build
running build
running build_ext
building 'lua-python' extension
creating build
creating build/temp.linux-i686-2.5
creating build/temp.linux-i686-2.5/src
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.5 -c src/pythoninlua.c -o build/temp.linux-i686-2.5/src/pythoninlua.o -rdynamic
src/pythoninlua.c:25:17: error: lua.h: No such file or directory
src/pythoninlua.c:26:21: error: lauxlib.h: No such file or directory
In file included from src/pythoninlua.c:28:
src/pythoninlua.h:28: error: expected ‘)’ before ‘*’ token
src/pythoninlua.h:35: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
In file included from src/pythoninlua.c:29:
src/luainpython.h:36: error: expected ‘)’ before ‘*’ token
src/luainpython.h:38: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
src/pythoninlua.c:31: error: expected ‘)’ before ‘*’ token
src/pythoninlua.c:33: error: expected ‘)’ before ‘*’ token
src/pythoninlua.c:50: error: expected ‘)’ before ‘*’ token
src/pythoninlua.c:95: error: expected ‘)’ before ‘*’ token
src/pythoninlua.c:142: error: expected ‘)’ before ‘*’ token
src/pythoninlua.c:179: error: expected ‘)’ before ‘*’ token
src/pythoninlua.c:190: error: expected ‘)’ before ‘*’ token
src/pythoninlua.c:228: error: expected ‘)’ before ‘*’ token
src/pythoninlua.c:257: error: expected ‘)’ before ‘*’ token
src/pythoninlua.c:269: error: expected ‘)’ before ‘*’ token
src/pythoninlua.c:313: error: expected ‘)’ before ‘*’ token
src/pythoninlua.c:322: error: expected ‘)’ before ‘*’ token
src/pythoninlua.c:343: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘py_object_lib’
src/pythoninlua.c:352: error: expected ‘)’ before ‘*’ token
src/pythoninlua.c:406: error: expected ‘)’ before ‘*’ token
src/pythoninlua.c:411: error: expected ‘)’ before ‘*’ token
src/pythoninlua.c:416: error: expected ‘)’ before ‘*’ token
src/pythoninlua.c:427: error: expected ‘)’ before ‘*’ token
src/pythoninlua.c:438: error: expected ‘)’ before ‘*’ token
src/pythoninlua.c:445: error: expected ‘)’ before ‘*’ token
src/pythoninlua.c:458: error: expected ‘)’ before ‘*’ token
src/pythoninlua.c:486: error: expected ‘)’ before ‘*’ token
src/pythoninlua.c:502: error: expected ‘)’ before ‘*’ token
src/pythoninlua.c:521: error: expected ‘)’ before ‘*’ token
src/pythoninlua.c:545: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘py_lib’
src/pythoninlua.c:558: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
error: command 'gcc' failed with exit status 1
make: *** [all] Error 1
Der Inhalt der "setup.py" sieht so aus(anm: die "Makefile" übernimmt nur die aufrufe der setup.py):
Code: Alles auswählen
from distutils.core import setup, Extension
from distutils.sysconfig import get_python_lib, get_python_version
import os
if os.path.isfile("MANIFEST"):
os.unlink("MANIFEST")
# You may have to change these
PYLIBS = ["python"+get_python_version(), "pthread", "util"]
PYLIBDIR = [get_python_lib(standard_lib=True)+"/config"]
LUALIBS = ["lua", "lualib"]
LUALIBDIR = []
setup(name="lunatic-python",
version = "1.0",
description = "Two-way bridge between Python and Lua",
author = "Gustavo Niemeyer",
author_email = "gustavo@niemeyer.net",
url = "http://labix.org/lunatic-python",
license = "LGPL",
long_description =
"""\
Lunatic Python is a two-way bridge between Python and Lua, allowing these
languages to intercommunicate. Being two-way means that it allows Lua inside
Python, Python inside Lua, Lua inside Python inside Lua, Python inside Lua
inside Python, and so on.
""",
ext_modules = [
Extension("lua-python",
["src/pythoninlua.c", "src/luainpython.c"],
library_dirs=PYLIBDIR,
libraries=PYLIBS,
extra_compile_args=["-rdynamic"],
extra_link_args=["-rdynamic"]),
Extension("lua",
["src/pythoninlua.c", "src/luainpython.c"],
library_dirs=LUALIBDIR,
libraries=LUALIBS,
extra_compile_args=["-rdynamic"],
extra_link_args=["-rdynamic"]),
],
)
Wär super wenn mir da jemand einen rat geben könnte, da einfach praktisch jede änderung in der setup.py anscheinend gänzlich ignoriert wird....