Skip to content

Commit 6107089

Browse files
authored
Merge pull request #544 from ErlendHaa/python311-wheels
Build python wheels for 3.11
2 parents a63601d + 113842e commit 6107089

File tree

7 files changed

+32
-32
lines changed

7 files changed

+32
-32
lines changed

.github/workflows/wheels.yaml

+12-10
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,27 @@ on: [push, pull_request]
44

55
jobs:
66
wheels:
7-
name: Build wheels on ${{ matrix.os }}
7+
name: Build wheels on ${{ matrix.os }} ${{ matrix.arch }}
88
runs-on: ${{ matrix.os }}
99
strategy:
1010
matrix:
11-
os: [ubuntu-20.04, macOS-10.15]
12-
arch: [auto]
1311
include:
1412
- os: windows-2019
1513
cmake_generator: "Visual Studio 16 2019"
1614
cmake_generator_platform: "x64"
17-
cibw-arch: AMD64
15+
arch: AMD64
1816
- os: windows-2019
1917
cmake_generator: "Visual Studio 16 2019"
2018
cmake_generator_platform: "Win32"
21-
cibw-arch: x86
19+
arch: x86
20+
- os: ubuntu-20.04
21+
arch: x86_64
2222
- os: ubuntu-20.04
2323
arch: aarch64
24+
- os: ubuntu-20.04
25+
arch: i686
26+
- os: macOS-10.15
27+
arch: x86_64
2428

2529
steps:
2630
- uses: actions/checkout@v2
@@ -33,17 +37,15 @@ jobs:
3337
name: Set up QEMU
3438

3539
- name: Install cibuildwheel
36-
run: python -m pip install cibuildwheel==2.3.1
40+
run: python -m pip install cibuildwheel
3741

3842
- name: Build wheels
3943
env:
4044
CIBW_ENVIRONMENT_WINDOWS: >
4145
CMAKE_GENERATOR="${{ matrix.cmake_generator }}"
4246
CMAKE_GENERATOR_PLATFORM="${{ matrix.cmake_generator_platform }}"
43-
CIBW_ARCHS_WINDOWS: ${{ matrix.cibw-arch }}
44-
CIBW_ARCHS_LINUX: ${{ matrix.arch }}
45-
CIBW_SKIP: pp* *-musllinux_* cp311*
46-
COMSPEC: C:\Program Files\PowerShell\7\pwsh.EXE
47+
CIBW_SKIP: pp* *-musllinux_*
48+
CIBW_ARCHS: ${{ matrix.arch }}
4749
run: |
4850
python -m cibuildwheel --output-dir wheelhouse python/
4951

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,9 @@ are available:
282282
standard-mandated textual header, and `1..n` are the optional extended
283283
headers.
284284

285-
The text headers are returned as 3200-byte string-like blobs (bytes in
286-
Python 3, str in Python 2), as it is in the file. The `segyio.tools.wrap`
287-
function can create a line-oriented version of this string.
285+
The text headers are returned as 3200-byte byte-like blobs as it is in the
286+
file. The `segyio.tools.wrap` function can create a line-oriented version
287+
of this string.
288288

289289
* `bin`
290290

@@ -311,7 +311,7 @@ are available:
311311

312312
>>> text = f.text[0]
313313
>>> type(text)
314-
<type 'bytes'> # 'str' in Python 2
314+
<type 'bytes'>
315315

316316
>>> f.trace[10] = np.zeros(len(f.samples))
317317
```

changelog.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 1.9.10
2+
* Distribute wheels for Python 3.11
3+
14
# 1.9.9
25
* Packaging updates
36

python/pyproject.toml

+6-14
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,18 @@ requires = [
88
]
99

1010
[tool.cibuildwheel]
11-
# To make sure that the library is built for the right arch (i686, amd64 etc)
12-
# then the host arch is added onto the build dir. This *must* be expanded by
13-
# cibuildwheel since the build host (runner) might be different than the target
14-
# emulated by the docker image. Ideally there would be a variable that holds
15-
# what's currently being compiled, but I've yet to find it.
16-
#
17-
# Since the command is issued through subprocess.run() then it runs on the
18-
# system native shell, which means all sorts of problems if that shell is
19-
# cmd.exe, since it doesn't understand substitution $(). On windows you change
20-
# the default shell by setting COMSPEC to either bash or powershell (or
21-
# something else that understands $()), but there is little to gain from
22-
# running cibuildwheel on a non-CI windows.
2311
before-build = [
2412
"""cmake \
2513
-S . \
26-
-B "cibw-$(python -c 'import platform;print(platform.machine())')/" \
14+
-B build \
2715
-DCMAKE_BUILD_TYPE=Release \
2816
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
2917
-DBUILD_TESTING=OFF \
3018
-DBUILD_PYTHON=OFF \
3119
-DBUILD_BIN=OFF \
3220
""",
3321
"""cmake \
34-
--build "cibw-$(python -c 'import platform;print(platform.machine())')/" \
22+
--build build \
3523
--parallel \
3624
--target install \
3725
--config Release \
@@ -69,5 +57,9 @@ test-command = [
6957
[tool.cibuildwheel.linux]
7058
manylinux-x86_64-image = "manylinux2010"
7159

60+
[[tool.cibuildwheel.overrides]]
61+
select = "cp311*"
62+
manylinux-x86_64-image = "manylinux2014"
63+
7264
[tool.cibuildwheel.macos]
7365
environment = { CXXFLAGS="-L/usr/local/lib" }

python/setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[metadata]
2-
version = 1.9.9
2+
version = 1.9.10
33

44
[aliases]
55
test=pytest

python/setup.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,12 @@ def src(x):
104104
'License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)',
105105
'Natural Language :: English',
106106
'Programming Language :: Python',
107-
'Programming Language :: Python :: 2.7',
108-
'Programming Language :: Python :: 3.5',
109107
'Programming Language :: Python :: 3.6',
108+
'Programming Language :: Python :: 3.7',
109+
'Programming Language :: Python :: 3.8',
110+
'Programming Language :: Python :: 3.9',
111+
'Programming Language :: Python :: 3.10',
112+
'Programming Language :: Python :: 3.11',
110113
'Topic :: Scientific/Engineering',
111114
'Topic :: Scientific/Engineering :: Physics',
112115
'Topic :: Software Development :: Libraries',

python/test/segy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ def test_assign_all_traces(small):
10751075

10761076

10771077
def test_traceaccess_from_array():
1078-
a = np.arange(10, dtype=np.int)
1078+
a = np.arange(10, dtype=int)
10791079
b = np.arange(10, dtype=np.int32)
10801080
c = np.arange(10, dtype=np.int64)
10811081
d = np.arange(10, dtype=np.intc)

0 commit comments

Comments
 (0)