lupa icon indicating copy to clipboard operation
lupa copied to clipboard

Build wheels for windows with LuaJit

Open emcek opened this issue 1 year ago • 4 comments

  1. Add Developer Command Prompt for Microsoft Visual C++.

This enables compile all needed libraries and successfully build wheels for both win_amd64 and win32 targets.

  1. Add test-command for windows to verify if module luajit21 was included in wheel

  2. restrict setuptools<72.0.0 due to test command has been removed, see more details:

  1. remove setuptools from Install dependencies step (for MacOS).

It was causing problems during building, when requirements.txt has setuptools with version restriction.

  1. Python 3.6 and 3.7 is not supported in Visual Studio 2019 image for AppVeyor

See: https://www.appveyor.com/docs/windows-images-software/#python

Related issues and PR: scoder/lupa#235, scoder/lupa#251

emcek avatar Oct 11 '24 21:10 emcek

It looks to me appveyor is kind of redundant (and slow), but I leave decision to you what to do with it.

Changes are working in my fork and producing working wheels:

emcek avatar Oct 11 '24 21:10 emcek

Yeah, setuptools!=72.0.0 I've tried this and it doesn't work. Do not remember, but I think I try setuptools==72.1.0 as well and it didn't work.

emcek avatar Oct 17 '24 07:10 emcek

@scoder Looks like AppVeyor job is passing but doctest of README.rst not! Not sure it is related to newest setuptools since we block only 72.0.0, but with setuptools<72.0.0 it was working at 3dd2562333eb9b53e7cb25b6e2f4fcf737731697

emcek avatar Oct 21 '24 15:10 emcek

From logs, there is problem with importing lua54 but job is passing.

python -u -m lupa.tests.__main__
test (unittest.loader._FailedTest) ... ERROR
C:\projects\lupa\lupa\tests\..\..\README.rst
Doctest: README.rst ... FAIL
======================================================================
ERROR: test (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test
Traceback (most recent call last):
  File "C:\Python37-x64\lib\unittest\loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
  File "C:\projects\lupa\lupa\tests\test.py", line 2368, in <module>
    @lupa.unpacks_lua_table
  File "C:\projects\lupa\lupa\__init__.py", line 90, in __getattr__
    lua = _newest_lib if _newest_lib is not None else _import_newest_lib()
  File "C:\projects\lupa\lupa\__init__.py", line 67, in _import_newest_lib
    _newest_lib = __import__(module_name[0], level=1, fromlist="*", globals=globals())
ModuleNotFoundError: No module named 'lupa.lua54'

emcek avatar Oct 22 '24 11:10 emcek

Thanks for getting this working.

scoder avatar Jan 10 '25 19:01 scoder