diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9cd1dd7e..4c9e3e8b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,6 +78,12 @@ jobs: if: contains(matrix.os, 'ubuntu') && matrix.lua-version != 'bundle' run: sudo apt-get install lib${{ matrix.lua-version }}-dev + - name: Setup Visual Studio + if: contains(matrix.os, 'windows') + uses: TheMrMilchmann/setup-msvc-dev@v3 + with: + arch: x64 + - name: Build wheel run: python setup.py sdist build_ext -j6 bdist_wheel env: diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index bef0baf1..d6ce4535 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -128,6 +128,18 @@ jobs: brew install automake libtool ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize + - name: Setup Visual Studio for x64 + if: contains(matrix.os, 'windows') && contains(matrix.only, 'win_amd64') + uses: TheMrMilchmann/setup-msvc-dev@v3 + with: + arch: x64 + + - name: Setup Visual Studio for x86 + if: contains(matrix.os, 'windows') && contains(matrix.only, 'win32') + uses: TheMrMilchmann/setup-msvc-dev@v3 + with: + arch: x86 + - name: Build wheels uses: pypa/cibuildwheel@v2.22.0 with: diff --git a/appveyor.yml b/appveyor.yml index 300b0e57..ae400193 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,29 +8,40 @@ environment: # APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 # - python: 27-x64 # APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013 + - python: 312 + arch: x86 + - python: 312-x64 + arch: x64 - python: 311 + arch: x86 - python: 311-x64 + arch: x64 - python: 310 + arch: x86 - python: 310-x64 + arch: x64 - python: 39 + arch: x86 - python: 39-x64 + arch: x64 - python: 38 + arch: x86 - python: 38-x64 + arch: x64 - python: 37 + arch: x86 - python: 37-x64 - - python: 36 - - python: 36-x64 - - python: 35 - - python: 35-x64 + arch: x64 install: - SET PATH=C:\\Python%PYTHON%;c:\\Python%PYTHON%\\scripts;%PATH% - - python -m pip.__main__ install -U pip wheel setuptools + - python -m pip.__main__ install -U pip wheel "setuptools!=72.0.0" - pip install -r requirements.txt - git submodule update --init --recursive build: off build_script: + - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" %ARCH% - python -u setup.py clean - python -u setup.py build install --use-bundle - python -u setup.py bdist_wheel --use-bundle diff --git a/pyproject.toml b/pyproject.toml index df0f4412..7ebb5b80 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,6 +26,7 @@ environment = {CFLAGS = "-O3 -g1 -pipe -fPIC -flto -march=armv8-a -mtune=cortex- [tool.cibuildwheel.windows] archs = ["AMD64", "x86"] +test-command = "python -c \"import lupa\" && python -c \"import lupa.lua54\" && python -c \"import lupa.luajit21\" " [tool.cibuildwheel.macos] # https://cibuildwheel.readthedocs.io/en/stable/faq/#what-to-provide suggests to provide diff --git a/setup.py b/setup.py index 57b2729d..5b94adb5 100644 --- a/setup.py +++ b/setup.py @@ -363,9 +363,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))) )