Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 621a9a6
Showing
13 changed files
with
1,833 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
recursive-include src *.c *.h | ||
include MANIFEST.in python.lua LICENSE Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# | ||
# Simple wrapper for setup.py script | ||
# | ||
|
||
DESTDIR=/ | ||
PYTHON=python | ||
|
||
prefix=/usr | ||
bindir=$(prefix)/bin | ||
|
||
all: | ||
$(PYTHON) setup.py build | ||
|
||
install: | ||
$(PYTHON) setup.py install \ | ||
--root=$(DESTDIR) \ | ||
--prefix=$(prefix) \ | ||
--install-scripts=$(bindir) | ||
|
||
dist: | ||
$(PYTHON) setup.py sdist | ||
|
||
rpm: | ||
$(PYTHON) setup.py bdist_rpm | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Metadata-Version: 1.0 | ||
Name: lunatic-python | ||
Version: 1.0 | ||
Summary: Two-way bridge between Python and Lua | ||
Home-page: http://labix.org/lunatic-python | ||
Author: Gustavo Niemeyer | ||
Author-email: gustavo@niemeyer.net | ||
License: LGPL | ||
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. | ||
|
||
Platform: UNKNOWN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
this is a fork of Lunatic Python, which can be found on the 'net at http://labix.org/lunatic-python. | ||
|
||
Sadly, Lunatic Python is very much outdated and won't work with either a current Python or Lua. | ||
|
||
This is an updated version of lunatic-python that works with Python 2.7 and Lua 5.1. | ||
I tried contacting the original author of Lunatic Python, but got no response. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
local path = os.getenv("LUA_SOPATH") | ||
if path then | ||
func = loadlib(path.."/lua-python.so", "luaopen_python") | ||
if func then | ||
func() | ||
return | ||
end | ||
end | ||
local modmask = "/usr/lib/python%d.%d/site-packages/lua-python.so" | ||
local loaded = false | ||
for i = 10, 2, -1 do | ||
for j = 10, 2, -1 do | ||
func = loadlib(string.format(modmask, i, j), "luaopen_python") | ||
if func then | ||
loaded = true | ||
func() | ||
break | ||
end | ||
end | ||
end | ||
if not loaded then | ||
error("unable to find python module") | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[bdist_rpm] | ||
doc_files = python.lua LICENSE | ||
use_bzip2 = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/usr/bin/python | ||
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"] | ||
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"]), | ||
], | ||
) |
Oops, something went wrong.