From 1c98218421a4bf544cf7b55479a8b47c1dc49af2 Mon Sep 17 00:00:00 2001 From: Andrew Gillespie <25agillespie@gmail.com> Date: Fri, 1 Dec 2023 14:29:17 -0500 Subject: [PATCH 1/2] changes setup.py to not explicitly check for "win" in platform name as it allows for building LuaJit on windows. --- setup.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/setup.py b/setup.py index 6f90e083..22a93d21 100644 --- a/setup.py +++ b/setup.py @@ -365,10 +365,6 @@ def has_option(name): # http://t-p-j.blogspot.com/2010/11/lupa-on-os-x-with-macports-python-26.html # LuaJIT 2.1-alpha3 fails at runtime. or (platform == 'darwin' and 'luajit' in os.path.basename(lua_bundle_path.rstrip(os.sep))) - # Couldn't get the Windows build to work. See - # https://luajit.org/install.html#windows - or (platform.startswith('win') and 'luajit' in os.path.basename(lua_bundle_path.rstrip(os.sep))) - # Let's restrict LuaJIT to x86_64 for now. or (get_machine() not in ("x86_64", "AMD64") and 'luajit' in os.path.basename(lua_bundle_path.rstrip(os.sep))) ) ] From b3eed168adbcf26ae949ba67e5845ad9b6f89b13 Mon Sep 17 00:00:00 2001 From: Andrew Gillespie <25agillespie@gmail.com> Date: Sun, 10 Dec 2023 19:37:35 -0500 Subject: [PATCH 2/2] Hopefully fixes appveyor build problems by specifically checking for the path that the vs2019 image uses. --- setup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup.py b/setup.py index 22a93d21..03513091 100644 --- a/setup.py +++ b/setup.py @@ -228,6 +228,11 @@ def use_bundled_luajit(path, macros): build_env = dict(os.environ) src_dir = os.path.join(path, "src") if platform.startswith('win'): + try: + subprocess.run(["C:\\Program Files(x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Auxiliary\\Build\\vcvarsall.bat", "x86_x64",]) + except FileNotFoundError: + print("vcvarsall not found in the location spesified by appveyor.yml. If you are not building on CI, this can safely be ignored.") + build_script = [os.path.join(src_dir, "msvcbuild.bat"), "static"] lib_file = "lua51.lib" else: