lunatic-python is loading
This commit is contained in:
parent
ebdcb6e3af
commit
e1445cabce
9
init.lua
9
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)
|
||||
|
@ -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()
|
||||
|
BIN
rasters/dem.orig.tif
Normal file
BIN
rasters/dem.orig.tif
Normal file
Binary file not shown.
BIN
rasters/dem.tif
BIN
rasters/dem.tif
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user