From f033f55a9cfcca64b0962eed56c4d8aa8112a0d1 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sat, 20 Jun 2026 15:53:36 +0200 Subject: [PATCH] Enable pip install on macOS --- setup.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 93d6cf0..8beddfc 100755 --- a/setup.py +++ b/setup.py @@ -1,12 +1,9 @@ #!/usr/bin/python -import sys import os +import sys -if sys.version > '3': - PY3 = True -else: - PY3 = False +PY3 = sys.version_info >= (3, 0) if PY3: import subprocess as commands @@ -68,7 +65,10 @@ def pkgconfig(*packages): return kwargs -lua_pkgconfig = pkgconfig('lua' + LUAVERSION, 'python-' + PYTHONVERSION) +if sys.platform == "darwin": # macOS + lua_pkgconfig = pkgconfig('lua' + LUAVERSION) +else: + lua_pkgconfig = pkgconfig('lua' + LUAVERSION, 'python-' + PYTHONVERSION) lua_pkgconfig['extra_compile_args'] = ['-I/usr/include/lua'+LUAVERSION, '-DPYTHON_LIBRT="' + str(PYTHON_LIBRT) + '"'] setup(name="lunatic-python",