diff --git a/init.lua b/init.lua index c9dfb99..0285676 100644 --- a/init.lua +++ b/init.lua @@ -12,10 +12,11 @@ local magick = ie.require "magick"--]] package.path = (MODPATH.."/lua-imagesize-1.2/?.lua;"..package.path) local imagesize = ie.require "imagesize" ---[[ -package.path = (MODPATH.."/lunatic-python-bugfix-1.1.1/?.lua;"..package.path) -local python = ie.require "python" -]] + +--[[package.loadlib("/usr/lib/x86_64-linux-gnu/libpython2.7.so", "*")--]] --may need to explicitly state this +--[[package.path = (MODPATH.."/lunatic-python-bugfix-1.1.1/?.lua;"..package.path) +local py = ie.require("python", "*") +py.execute("import grass.script as gscript")--]] --ONLY RUN ONE OF MAGICK OR IMLIB2 AT ANY TIME package.path = (MODPATH.."/magick/?.lua;"..MODPATH.."/magick/?/init.lua;"..package.path) diff --git a/lunatic-python-bugfix-1.1.1/python.lua b/lunatic-python-bugfix-1.1.1/python.lua index 06520f7..36ccc00 100644 --- a/lunatic-python-bugfix-1.1.1/python.lua +++ b/lunatic-python-bugfix-1.1.1/python.lua @@ -1,16 +1,17 @@ local path = "/usr/lib/python2.7/site-packages" if path then - func = package.loadlib(path.."/lua-python.so", "lua-python") + func = assert(package.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 = package.loadlib(string.format(modmask, i, j), "lua") + func = package.loadlib(string.format(modmask, i, j), "luaopen_python") if func then loaded = true func() diff --git a/rasters/dem.orig.tif b/rasters/dem.orig.tif new file mode 100644 index 0000000..a62b7b9 Binary files /dev/null and b/rasters/dem.orig.tif differ diff --git a/rasters/dem.tif b/rasters/dem.tif index a62b7b9..1e4f032 100644 Binary files a/rasters/dem.tif and b/rasters/dem.tif differ