Skip to content

Instantly share code, notes, and snippets.

@larme
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larme/9079789cdb1f2fb72b34 to your computer and use it in GitHub Desktop.
Save larme/9079789cdb1f2fb72b34 to your computer and use it in GitHub Desktop.
Install lupa on Mac if you cannot install it using package manager like macports or homebrew

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment