Skip to content

Commit f553a5b

Browse files
authored
Merge branch 'master' into master
2 parents d904800 + 04696c5 commit f553a5b

File tree

17 files changed

+135
-297
lines changed

17 files changed

+135
-297
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,16 @@ jobs:
1212
matrix:
1313
os:
1414
- windows-2019
15-
- ubuntu-20.04
16-
- macos-12
15+
- ubuntu-latest
1716
- macos-latest
1817
python-version:
19-
- "2.7"
18+
- "3.14-dev"
19+
- "3.13"
2020
- "3.12"
2121
- "3.11"
2222
- "3.10"
2323
- "3.9"
2424
- "3.8"
25-
- "3.7"
26-
- "3.6"
27-
- "pypy-2.7"
28-
- "pypy-3.7"
2925
- "pypy-3.8"
3026
- "pypy-3.9"
3127
- "pypy-3.10"
@@ -36,10 +32,6 @@ jobs:
3632
- "luajit-5.1"
3733

3834
exclude:
39-
- os: windows-2019
40-
python-version: "2.7"
41-
- os: windows-2019
42-
python-version: pypy-2.7
4335
- os: windows-2019
4436
lua-version: lua5.2
4537
- os: windows-2019
@@ -49,25 +41,6 @@ jobs:
4941
- os: windows-2019
5042
lua-version: luajit-5.1
5143

52-
- os: macos-12
53-
python-version: "2.7"
54-
- os: macos-latest
55-
python-version: "2.7"
56-
- os: macos-latest
57-
python-version: "3.6"
58-
- os: macos-latest
59-
python-version: "3.7"
60-
- os: macos-latest
61-
python-version: pypy-3.7
62-
63-
- os: macos-12
64-
lua-version: lua5.2
65-
- os: macos-12
66-
lua-version: lua5.3
67-
- os: macos-12
68-
lua-version: lua5.4
69-
- os: macos-12
70-
lua-version: luajit-5.1
7144
- os: macos-latest
7245
lua-version: lua5.2
7346
- os: macos-latest
@@ -92,45 +65,37 @@ jobs:
9265
run: git submodule update --init --recursive
9366

9467
- name: Set up Python ${{ matrix.python-version }}
95-
if: startsWith(matrix.python-version, '3.') || startsWith(matrix.python-version, 'pypy') || !startsWith(matrix.os, 'ubuntu')
9668
uses: actions/setup-python@v5
9769
with:
9870
python-version: ${{ matrix.python-version }}
9971

100-
- name: Set up Python2 (Linux)
101-
if: matrix.python-version == '2.7' && startsWith(matrix.os, 'ubuntu')
102-
run: |
103-
sudo ln -fs python2 /usr/bin/python
104-
sudo apt-get update
105-
sudo apt-get install python-setuptools python2.7 python2.7-dev
106-
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
107-
sudo python2 get-pip.py
108-
ls -l /usr/bin/pip* /usr/local/bin/pip*
109-
which pip
110-
11172
- name: Set up Python packages
11273
run: |
113-
python -m pip install -U ${{ startsWith(matrix.python-version, '2.7') && '"pip<21" "setuptools<45"' || 'pip setuptools' }}
74+
python -m pip install -U pip setuptools
11475
python -m pip install -U wheel tox virtualenv pytest -r requirements.txt
11576
11677
- name: Set up Lua ${{ matrix.lua-version }}
11778
if: contains(matrix.os, 'ubuntu') && matrix.lua-version != 'bundle'
11879
run: sudo apt-get install lib${{ matrix.lua-version }}-dev
11980

81+
- name: Setup Visual Studio
82+
if: contains(matrix.os, 'windows')
83+
uses: TheMrMilchmann/setup-msvc-dev@v3
84+
with:
85+
arch: x64
86+
12087
- name: Build wheel
121-
run: python setup.py sdist ${{ contains(matrix.python-version, '3.') && 'build_ext -j6' || '' }} bdist_wheel
88+
run: python setup.py sdist build_ext -i -j6 bdist_wheel
12289
env:
12390
SETUP_OPTIONS: ${{ !contains(matrix.lua-version, 'luajit') && (contains(matrix.lua-version, 'bundle') && '--use-bundle' || '--no-luajit') || '' }}
12491
CFLAGS: ${{ env.CFLAGS }} ${{ env.CFLAGS_LTO }}
12592
LDFLAGS: ${{ env.CFLAGS_LTO }}
12693

12794
- name: Run tests
128-
run: pytest lupa
95+
run: |
96+
bash -c "python -m pip install dist/lupa-*.whl"
97+
pytest lupa
12998
continue-on-error: ${{ contains(matrix.python-version, 'pypy') }}
130-
env:
131-
SETUP_OPTIONS: ${{ !contains(matrix.lua-version, 'luajit') && (contains(matrix.lua-version, 'bundle') && '--use-bundle' || '--no-luajit') || '' }}
132-
CFLAGS: ${{ env.CFLAGS }} ${{ env.CFLAGS_LTO }}
133-
LDFLAGS: ${{ env.CFLAGS_LTO }}
13499

135100
- name: Upload wheels
136101
if: matrix.lua-version == 'bundle' && matrix.os == 'macos-latest'

.github/workflows/wheels.yml

Lines changed: 28 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ permissions: {}
4040

4141
jobs:
4242
sdist:
43-
runs-on: ubuntu-20.04
43+
runs-on: ubuntu-latest
4444

4545
permissions:
4646
contents: write # to create GitHub release (softprops/action-gh-release)
@@ -68,12 +68,6 @@ jobs:
6868
name: sdist
6969
path: dist/*.tar.gz
7070

71-
- name: Release
72-
uses: softprops/action-gh-release@v2
73-
if: startsWith(github.ref, 'refs/tags/')
74-
with:
75-
files: dist/*.tar.gz
76-
7771
generate-wheels-matrix:
7872
# Create a matrix of all architectures & versions to build.
7973
# This enables the next step to run cibuildwheel in parallel.
@@ -86,13 +80,14 @@ jobs:
8680
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
8781
- name: Install cibuildwheel
8882
# Nb. keep cibuildwheel version pin consistent with job below
89-
run: pipx install cibuildwheel==2.16.5
83+
run: pipx install cibuildwheel==2.22.0
9084
- id: set-matrix
9185
run: |
9286
MATRIX=$(
9387
{
9488
cibuildwheel --print-build-identifiers --platform linux \
9589
| jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \
90+
| sed -e '/aarch64/s|ubuntu-latest|ubuntu-24.04-arm|' \
9691
&& cibuildwheel --print-build-identifiers --platform macos \
9792
| jq -nRc '{"only": inputs, "os": "macos-latest"}' \
9893
&& cibuildwheel --print-build-identifiers --platform windows \
@@ -134,8 +129,20 @@ jobs:
134129
brew install automake libtool
135130
ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize
136131
132+
- name: Setup Visual Studio for x64
133+
if: contains(matrix.os, 'windows') && contains(matrix.only, 'win_amd64')
134+
uses: TheMrMilchmann/setup-msvc-dev@v3
135+
with:
136+
arch: x64
137+
138+
- name: Setup Visual Studio for x86
139+
if: contains(matrix.os, 'windows') && contains(matrix.only, 'win32')
140+
uses: TheMrMilchmann/setup-msvc-dev@v3
141+
with:
142+
arch: x86
143+
137144
- name: Build wheels
138-
uses: pypa/cibuildwheel@v2.16.5
145+
uses: pypa/cibuildwheel@v2.22.0
139146
with:
140147
only: ${{ matrix.only }}
141148

@@ -146,7 +153,7 @@ jobs:
146153

147154
upload_release_assets:
148155
name: Upload Release Wheels
149-
needs: [ build_wheels, Linux, non-Linux ]
156+
needs: [ build_wheels, Linux ]
150157
runs-on: ubuntu-latest
151158
if: startsWith(github.ref, 'refs/tags')
152159

@@ -171,10 +178,11 @@ jobs:
171178
- name: Release
172179
uses: softprops/action-gh-release@v2
173180
with:
174-
files: ./bdist_downloads/*.whl
181+
files: |
182+
./bdist_downloads/*.whl
183+
./bdist_downloads/*.tar.gz
175184
176185
Linux:
177-
runs-on: ubuntu-latest
178186

179187
strategy:
180188
# Allows for matrix sub-jobs to fail without canceling the rest
@@ -185,10 +193,17 @@ jobs:
185193
- manylinux2014_x86_64
186194
- manylinux2014_i686
187195
pyversion: ["*"]
196+
os: ubuntu-latest
188197

189198
include:
190199
- image: manylinux2014_aarch64
191200
pyversion: "cp36*"
201+
os: ubuntu-24.04-arm
202+
- image: manylinux2014_aarch64
203+
pyversion: "cp37*"
204+
os: ubuntu-24.04-arm
205+
206+
runs-on: ${{ matrix.os }}
192207

193208
steps:
194209
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@@ -199,7 +214,7 @@ jobs:
199214
- name: Set up Python
200215
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
201216
with:
202-
python-version: "3.9"
217+
python-version: "3.12"
203218

204219
- name: Install dependencies
205220
run: python -m pip install -r requirements.txt
@@ -214,68 +229,3 @@ jobs:
214229
name: wheels-${{ matrix.image }}
215230
path: wheelhouse_*/*-m*linux*.whl # manylinux / musllinux
216231
if-no-files-found: ignore
217-
218-
non-Linux:
219-
strategy:
220-
# Allows for matrix sub-jobs to fail without canceling the rest
221-
fail-fast: false
222-
223-
matrix:
224-
os:
225-
- macos-12
226-
#- windows-2019
227-
pyversion:
228-
- "2.7"
229-
- "3.6"
230-
#- "pypy-3.7-v7.3.7"
231-
#- "pypy-3.8-v7.3.7"
232-
#- "pypy-3.9-v7.3.11"
233-
#- "pypy-3.10-v7.3.13"
234-
235-
exclude:
236-
# outdated compilers and probably not worth supporting anymore
237-
- os: windows-2019
238-
pyversion: "2.7"
239-
240-
runs-on: ${{ matrix.os }}
241-
env:
242-
USE_BUNDLE: "true"
243-
MACOSX_DEPLOYMENT_TARGET: "11.0"
244-
LUPA_WITH_LUA_DLOPEN: ${{ startsWith(matrix.os, 'windows') && 'false' || 'true' }}
245-
PYTHON_BIN_DIR: ${{ startsWith(matrix.pyversion, '2.') && '/Library/Frameworks/Python.framework/Versions/2.7/bin' || '' }}
246-
247-
steps:
248-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
249-
250-
- name: Check out recursively
251-
run: git submodule update --init --recursive
252-
253-
- name: Set up Python
254-
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
255-
# macOS has Py2.7 installed system wide
256-
if: matrix.pyversion != '2.7'
257-
with:
258-
python-version: ${{ matrix.pyversion }}
259-
260-
- name: Install MacOS dependencies
261-
if: startsWith(matrix.os, 'mac')
262-
run: |
263-
brew install automake libtool
264-
ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize
265-
266-
- name: Install dependencies
267-
run: |
268-
export PATH=$PYTHON_BIN_DIR:$PATH
269-
python -m pip install setuptools wheel -r requirements.txt
270-
271-
- name: Build wheels
272-
run: |
273-
export PATH=$PYTHON_BIN_DIR:$PATH
274-
python setup.py --with-cython sdist ${{ contains(matrix.pyversion, '3.') && 'build_ext -j6' || '' }} bdist_wheel
275-
276-
- name: Upload wheels
277-
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
278-
with:
279-
name: wheels-${{ matrix.pyversion }}-${{ matrix.os }}
280-
path: dist/*.whl
281-
if-no-files-found: ignore

CHANGES.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
11
Lupa change log
22
===============
33

4+
2.4 (2025-01-10)
5+
----------------
6+
7+
* The windows wheels now bundle LuaJIT 2.0 and 2.1.
8+
(patch by Michal Plichta)
9+
10+
* Failures in the test suite didn't set a non-zero process exit value.
11+
12+
13+
2.3 (2025-01-09)
14+
----------------
15+
16+
* The bundled LuaJIT versions were updated to the latest git branches.
17+
18+
* The bundled Lua 5.4 was updated to 5.4.7.
19+
20+
* Removed support for Python 2.x.
21+
22+
* Built with Cython 3.0.11.
23+
24+
425
2.2 (2024-06-02)
526
----------------
627

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ setter function implementations for a ``LuaRuntime``:
935935
... raise AttributeError(
936936
... 'not allowed to write attribute "%s"' % attr_name)
937937
938-
>>> class X(object):
938+
>>> class X:
939939
... yes = 123
940940
... put = 'abc'
941941
... noway = 2.1

appveyor.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,41 @@ environment:
88
# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
99
# - python: 27-x64
1010
# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
11+
- python: 312
12+
arch: x86
13+
- python: 312-x64
14+
arch: x64
1115
- python: 311
16+
arch: x86
1217
- python: 311-x64
18+
arch: x64
1319
- python: 310
20+
arch: x86
1421
- python: 310-x64
22+
arch: x64
1523
- python: 39
24+
arch: x86
1625
- python: 39-x64
26+
arch: x64
1727
- python: 38
28+
arch: x86
1829
- python: 38-x64
30+
arch: x64
1931
- python: 37
32+
arch: x86
2033
- python: 37-x64
21-
- python: 36
22-
- python: 36-x64
23-
- python: 35
24-
- python: 35-x64
34+
arch: x64
2535

2636
install:
2737
- SET PATH=C:\\Python%PYTHON%;c:\\Python%PYTHON%\\scripts;%PATH%
28-
- python -m pip.__main__ install -U pip wheel setuptools
38+
- python -m pip.__main__ install -U pip wheel "setuptools!=72.0.0"
2939
- pip install -r requirements.txt
3040
- pip install pytest
3141
- git submodule update --init --recursive
3242

3343
build: off
3444
build_script:
45+
- call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" %ARCH%
3546
- python -u setup.py clean
3647
- python -u setup.py build install --use-bundle
3748
- python -u setup.py bdist_wheel --use-bundle

lupa/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from __future__ import absolute_import
2-
31
from contextlib import contextmanager as _contextmanager
42

53
# Find the implementation with the latest Lua version available.

0 commit comments

Comments
 (0)