On 29 June 2013 03:56, Gary V. Vaughan <g...@vaughan.pe> wrote:
> If you want to manage separate rocks_trees for parallel installations of
> lua5.1 and lua5.2,
> from a single LuaRocks install, this page at the lua-users wiki explains how
> to set that up:
>
> http://lua-users.org/wiki/LuaRocksConfig

This is a viable, but certainly complicated configuration, which is
only needed if you want to keep your original LUA_PATH values at the
front of the search path list _and_ use two trees rooted at different
prefixes.

LuaRocks can handle two rocks trees normally when using the same
prefix for Lua 5.1 and 5.2 (for example /usr/local -- the luarocks
dirs become /usr/local/share/luarocks/rocks-{5.1,5.2} and modules
install to /usr/local/{share,lib}/lua/{5.1,5.2}). Just launch it with
the right interpreter, with no extra wrappers required.

Gary's recipe is a good solution to a particular scenario (and LR
offers tons of config options and environment variables precisely to
allow this kind of flexibility!), but I just wanted to point out that
not all users need to follow this recipe just to use LR with Lua 5.1
and 5.2.

Also, the wrappers can be a couple of lines shorter if you install
config-5.1.lua and config-5.2.lua in your SYSCONFDIR directory
(configured at ./configure time -- check luarocks/site_config.lua, in
your system it's probably /usr/local/etc/luarocks).

-- Hisham

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Luarocks-developers mailing list
Luarocks-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Reply via email to