Skip to content

Commit df3d35b

Browse files
authored
Merge pull request #150 from static-frame/149/py312
2 parents af06ce6 + 948f54b commit df3d35b

10 files changed

+79
-43
lines changed

.github/workflows/ci.yml

Lines changed: 60 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- master
99
release:
1010
types: [published]
11+
1112
jobs:
1213
tar_gz:
1314
name: Package
@@ -16,109 +17,132 @@ jobs:
1617
- uses: actions/checkout@master
1718
- uses: actions/setup-python@master
1819
with:
19-
python-version: 3.8
20-
- run: pip install -r requirements-build-backward.txt
20+
python-version: 3.12
21+
- run: pip install -r requirements-build-3_12.txt
2122
- run: python setup.py sdist
2223
- uses: actions/upload-artifact@v3
2324
with:
2425
name: dist
2526
path: dist
2627

27-
whl_lt_3_9:
28-
name: Build / ${{ matrix.os }} / Python ${{ matrix.major }}.${{ matrix.minor }}
28+
matrix_config:
29+
name: Matrix Runner Config
30+
runs-on: ubuntu-22.04
31+
outputs:
32+
matrix_os: ${{ steps.step.outputs.matrix_os }}
33+
steps:
34+
- run: echo "$GITHUB_EVENT_NAME"
35+
- id: step
36+
run: |
37+
if [ "$GITHUB_EVENT_NAME" = "release" ]; then
38+
echo 'matrix_os=["macos-13-xlarge", "ubuntu-22.04", "windows-2022"]' >> $GITHUB_OUTPUT
39+
else
40+
echo 'matrix_os=["macos-13", "ubuntu-22.04", "windows-2022"]' >> $GITHUB_OUTPUT
41+
fi
42+
43+
whl_3_8:
44+
name: Build / ${{ matrix.os }} / Python 3.${{ matrix.minor }}
45+
needs: matrix_config
2946
strategy:
3047
fail-fast: false
3148
matrix:
32-
os: [macos-12, ubuntu-22.04, windows-2022]
33-
major: [3]
49+
os: ${{ fromJson(needs.matrix_config.outputs.matrix_os) }}
3450
minor: [8]
3551
runs-on: ${{ matrix.os }}
3652
steps:
3753
- uses: actions/checkout@master
3854
- uses: actions/setup-python@master
3955
- run: echo '::add-matcher::.github/problem-matchers/gcc.json'
40-
if: matrix.os == 'macos-12' || matrix.os == 'ubuntu-22.04'
56+
if: matrix.os == 'macos-13' || matrix.os == 'ubuntu-22.04'
4157
- run: echo '::add-matcher::.github/problem-matchers/msvc.json'
4258
if: matrix.os == 'windows-2022'
4359

44-
- uses: pypa/[email protected]
60+
- run: pip install pipx
61+
- uses: pypa/[email protected]
4562
with:
4663
output-dir: dist
4764
env:
48-
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
49-
CIBW_BEFORE_BUILD: pip install -r {project}/requirements-build-backward.txt
50-
CIBW_BUILD: cp${{ matrix.major }}${{ matrix.minor }}-*
51-
CIBW_BUILD_VERBOSITY: 1
52-
CIBW_BEFORE_TEST: pip install -r {project}/requirements-test-backward.txt
65+
CIBW_BUILD: cp3${{ matrix.minor }}-*
66+
CIBW_ARCHS_WINDOWS: x86 AMD64
67+
CIBW_ARCHS_MACOS: x86_64 arm64
68+
CIBW_BEFORE_BUILD: pip install -r {project}/requirements-build-3_08.txt
69+
CIBW_BEFORE_TEST: pip install -r {project}/requirements-dev-3_08.txt
5370
CIBW_TEST_COMMAND: pytest {project}/test
5471
- uses: actions/upload-artifact@v3
5572
with:
5673
name: dist
5774
path: dist
5875

59-
whl_gte_3_9:
60-
name: Build / ${{ matrix.os }} / Python ${{ matrix.major }}.${{ matrix.minor }}
76+
whl_3_9_to_3_11:
77+
name: Build / ${{ matrix.os }} / Python 3.${{ matrix.minor }}
78+
needs: matrix_config
6179
strategy:
6280
fail-fast: false
6381
matrix:
64-
os: [macos-12, ubuntu-22.04, windows-2022]
65-
major: [3]
82+
os: ${{fromJson(needs.matrix_config.outputs.matrix_os)}}
6683
minor: [9, 10, 11]
6784
runs-on: ${{ matrix.os }}
6885
steps:
6986
- uses: actions/checkout@master
7087
- uses: actions/setup-python@master
7188
- run: echo '::add-matcher::.github/problem-matchers/gcc.json'
72-
if: matrix.os == 'macos-12' || matrix.os == 'ubuntu-22.04'
89+
if: matrix.os == 'macos-13' || matrix.os == 'ubuntu-22.04'
7390
- run: echo '::add-matcher::.github/problem-matchers/msvc.json'
7491
if: matrix.os == 'windows-2022'
7592

76-
- uses: pypa/[email protected]
93+
- run: pip install pipx
94+
- uses: pypa/[email protected]
7795
with:
7896
output-dir: dist
7997
env:
80-
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
81-
CIBW_BEFORE_BUILD: pip install -r {project}/requirements-build.txt
82-
CIBW_BUILD: cp${{ matrix.major }}${{ matrix.minor }}-*
83-
CIBW_BUILD_VERBOSITY: 1
84-
CIBW_BEFORE_TEST: pip install -r {project}/requirements-test.txt
98+
CIBW_BUILD: cp3${{ matrix.minor }}-*
99+
CIBW_ARCHS_WINDOWS: x86 AMD64
100+
CIBW_ARCHS_MACOS: x86_64 arm64
101+
CIBW_BEFORE_BUILD: pip install -r {project}/requirements-build-3_11.txt
102+
CIBW_BEFORE_TEST: pip install -r {project}/requirements-dev-3_11.txt
85103
CIBW_TEST_COMMAND: pytest {project}/test
86104
- uses: actions/upload-artifact@v3
87105
with:
88106
name: dist
89107
path: dist
90108

91-
forward:
92-
name: Forward / ${{ matrix.os }} / Python ${{ matrix.major }}.${{ matrix.minor }}
109+
whl_3_12:
110+
name: Build / ${{ matrix.os }} / Python 3.${{ matrix.minor }}
111+
needs: matrix_config
93112
strategy:
94113
fail-fast: false
95114
matrix:
96-
os: [ubuntu-22.04]
97-
major: [3]
98-
minor: [11]
115+
os: ${{fromJson(needs.matrix_config.outputs.matrix_os)}}
116+
minor: [12]
99117
runs-on: ${{ matrix.os }}
100118
steps:
101119
- uses: actions/checkout@master
102120
- uses: actions/setup-python@master
103121
- run: echo '::add-matcher::.github/problem-matchers/gcc.json'
104-
if: matrix.os == 'macos-12' || matrix.os == 'ubuntu-22.04'
122+
if: matrix.os == 'macos-13' || matrix.os == 'ubuntu-22.04'
105123
- run: echo '::add-matcher::.github/problem-matchers/msvc.json'
106124
if: matrix.os == 'windows-2022'
107125

108-
- uses: pypa/[email protected]
126+
- run: pip install pipx
127+
- uses: pypa/[email protected]
109128
with:
110129
output-dir: dist
111130
env:
112-
CIBW_BEFORE_BUILD: pip install -r {project}/requirements-build.txt
113-
CIBW_BUILD: cp${{ matrix.major }}${{ matrix.minor }}-*
114-
CIBW_BUILD_VERBOSITY: 1
115-
CIBW_BEFORE_TEST: pip install -r {project}/requirements-test-forward.txt
131+
CIBW_BUILD: cp3${{ matrix.minor }}-*
132+
CIBW_ARCHS_WINDOWS: AMD64 # testing requires pandas, which does not publish 3.12 32bit x86 wheels
133+
CIBW_ARCHS_MACOS: x86_64 arm64
134+
CIBW_BEFORE_BUILD: pip install -r {project}/requirements-build-3_12.txt
135+
CIBW_BEFORE_TEST: pip install -r {project}/requirements-dev-3_12.txt
116136
CIBW_TEST_COMMAND: pytest {project}/test
137+
- uses: actions/upload-artifact@v3
138+
with:
139+
name: dist
140+
path: dist
117141

118142
upload:
119143
name: Publish
120144
if: github.event_name == 'release'
121-
needs: [tar_gz, whl_lt_3_9, whl_gte_3_9, forward]
145+
needs: [tar_gz, whl_3_8, whl_3_9_to_3_11, whl_3_12]
122146
runs-on: ubuntu-22.04
123147
steps:
124148
- uses: actions/download-artifact@v3

README.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@ ArrayKit requires the following:
3737
What is New in ArrayKit
3838
-------------------------
3939

40+
41+
0.5.0
42+
............
43+
44+
Now building wheels for 3.12.
45+
46+
Now building functional wheels for Mac OS ``arm64`` / Apple Silicon
47+
48+
4049
0.4.11
4150
............
4251

File renamed without changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
numpy==1.23.5
2+

requirements-build-3_12.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
numpy==1.26.2
2+
setuptools==69.*
File renamed without changes.
File renamed without changes.

requirements-dev-3_12.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
numpy==1.26.2
2+
pytest==7.1.2
3+
invoke==2.2.0
4+
pandas==2.1.3
5+
hypothesis==6.10.1

requirements-test-forward.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from setuptools import setup
66
from pathlib import Path
77

8-
AK_VERSION = '0.4.11'
8+
AK_VERSION = '0.5.0'
99

1010
def get_long_description() -> str:
1111
return '''The ArrayKit library provides utilities for creating and transforming NumPy arrays, implementing performance-critical StaticFrame operations as Python C extensions.
@@ -39,7 +39,6 @@ def get_ext_dir(*components: tp.Iterable[str]) -> tp.Sequence[str]:
3939
libraries=['npymath'], # not including mlib at this time
4040
)
4141

42-
4342
setup(
4443
name='arraykit',
4544
version=AK_VERSION,
@@ -63,6 +62,7 @@ def get_ext_dir(*components: tp.Iterable[str]) -> tp.Sequence[str]:
6362
'Programming Language :: Python :: 3.9',
6463
'Programming Language :: Python :: 3.10',
6564
'Programming Language :: Python :: 3.11',
65+
'Programming Language :: Python :: 3.12',
6666
],
6767
keywords='numpy array',
6868
packages=['arraykit'],

0 commit comments

Comments
 (0)