lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Am 08.09.2015 um 22:42 schröbte Coda Highland:

The way most packaging systems handle this is to give the distinct
versions distinct package names instead of trying to use the version
number. For example, in Ubuntu, Python libraries that support both 2
and 3 are shipped as "python-xxx" and "python3-xxx" (e.g.
"python-cairo" vs. "python3-cairo").

So you might have mylib_51 version 1.0.2-1, mylib_52 version 1.0.2-1,
and mylib_53 version 1.0.2-1 -- and, if your 5.1 version isn't
LuaJIT-compatible for whatever reason, perhaps mylib_lj version
1.0.2-1 or similar.

That's difficult, because LuaRocks doesn't support alternative dependencies, so something like
    dependencies = {
      "mylib_51 >= 1.0 | mylib_52 >= 1.0 | mylib_53 >= 1.0"
    }
won't work.

On the other hand LuaRocks does support separate manifests for the different Lua versions, so that `luarocks-5.1 install mylib` will install the latest mylib version that's compatible with Lua 5.1. There's nothing wrong with taking advantage of that fact. It's unfortunate though that ULua currently does things differently.


/s/ Adam


Philipp