Install lupa on Mac if you cannot install it using package manager like macports or homebrew

May 1, 2015 ยท View on GitHub

We use lua 5.1's source codes as a replacement of luajit's source codes.

  1. virtualvenv venv and switch to the virtual enviornment
  2. pip install cython
  3. git clone https://github.com/scoder/lupa.git
  4. cd lupa/, copy lua 5.1 source tarball here and tar zxf it.
  5. go to lua-5.1.5/src then make macosx
  6. Back to lupa's root directory, open setup.py, change the following lines:
  # from 

  if not filename.lower().startswith('luajit'):
      continue

  # =>

  if not filename.lower().startswith('lua'):
      continue

  # from 

  libfile = os_path.join(filepath, 'libluajit.a')

  # to

  libfile = os_path.join(filepath, 'liblua.a')

Finally python setup.py install