diff --git a/.github/workflows/wheels.yaml b/.github/workflows/wheels.yaml index f5c39bc2..30d6bb33 100644 --- a/.github/workflows/wheels.yaml +++ b/.github/workflows/wheels.yaml @@ -4,23 +4,27 @@ on: [push, pull_request] jobs: wheels: - name: Build wheels on ${{ matrix.os }} + name: Build wheels on ${{ matrix.os }} ${{ matrix.arch }} runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04, macOS-10.15] - arch: [auto] include: - os: windows-2019 cmake_generator: "Visual Studio 16 2019" cmake_generator_platform: "x64" - cibw-arch: AMD64 + arch: AMD64 - os: windows-2019 cmake_generator: "Visual Studio 16 2019" cmake_generator_platform: "Win32" - cibw-arch: x86 + arch: x86 + - os: ubuntu-20.04 + arch: x86_64 - os: ubuntu-20.04 arch: aarch64 + - os: ubuntu-20.04 + arch: i686 + - os: macOS-10.15 + arch: x86_64 steps: - uses: actions/checkout@v2 @@ -33,17 +37,15 @@ jobs: name: Set up QEMU - name: Install cibuildwheel - run: python -m pip install cibuildwheel==2.3.1 + run: python -m pip install cibuildwheel - name: Build wheels env: CIBW_ENVIRONMENT_WINDOWS: > CMAKE_GENERATOR="${{ matrix.cmake_generator }}" CMAKE_GENERATOR_PLATFORM="${{ matrix.cmake_generator_platform }}" - CIBW_ARCHS_WINDOWS: ${{ matrix.cibw-arch }} - CIBW_ARCHS_LINUX: ${{ matrix.arch }} - CIBW_SKIP: pp* *-musllinux_* cp311* - COMSPEC: C:\Program Files\PowerShell\7\pwsh.EXE + CIBW_SKIP: pp* *-musllinux_* + CIBW_ARCHS: ${{ matrix.arch }} run: | python -m cibuildwheel --output-dir wheelhouse python/ diff --git a/README.md b/README.md index f6677bb6..67600a3d 100644 --- a/README.md +++ b/README.md @@ -282,9 +282,9 @@ are available: standard-mandated textual header, and `1..n` are the optional extended headers. - The text headers are returned as 3200-byte string-like blobs (bytes in - Python 3, str in Python 2), as it is in the file. The `segyio.tools.wrap` - function can create a line-oriented version of this string. + The text headers are returned as 3200-byte byte-like blobs as it is in the + file. The `segyio.tools.wrap` function can create a line-oriented version + of this string. * `bin` @@ -311,7 +311,7 @@ are available: >>> text = f.text[0] >>> type(text) - # 'str' in Python 2 + >>> f.trace[10] = np.zeros(len(f.samples)) ``` diff --git a/changelog.md b/changelog.md index 10e8d583..ab4f4ecc 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,6 @@ +# 1.9.10 +* Distribute wheels for Python 3.11 + # 1.9.9 * Packaging updates diff --git a/python/pyproject.toml b/python/pyproject.toml index 9d7d644e..1f1f5c1a 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -8,22 +8,10 @@ requires = [ ] [tool.cibuildwheel] -# To make sure that the library is built for the right arch (i686, amd64 etc) -# then the host arch is added onto the build dir. This *must* be expanded by -# cibuildwheel since the build host (runner) might be different than the target -# emulated by the docker image. Ideally there would be a variable that holds -# what's currently being compiled, but I've yet to find it. -# -# Since the command is issued through subprocess.run() then it runs on the -# system native shell, which means all sorts of problems if that shell is -# cmd.exe, since it doesn't understand substitution $(). On windows you change -# the default shell by setting COMSPEC to either bash or powershell (or -# something else that understands $()), but there is little to gain from -# running cibuildwheel on a non-CI windows. before-build = [ """cmake \ -S . \ - -B "cibw-$(python -c 'import platform;print(platform.machine())')/" \ + -B build \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ -DBUILD_TESTING=OFF \ @@ -31,7 +19,7 @@ before-build = [ -DBUILD_BIN=OFF \ """, """cmake \ - --build "cibw-$(python -c 'import platform;print(platform.machine())')/" \ + --build build \ --parallel \ --target install \ --config Release \ @@ -69,5 +57,9 @@ test-command = [ [tool.cibuildwheel.linux] manylinux-x86_64-image = "manylinux2010" +[[tool.cibuildwheel.overrides]] +select = "cp311*" +manylinux-x86_64-image = "manylinux2014" + [tool.cibuildwheel.macos] environment = { CXXFLAGS="-L/usr/local/lib" } diff --git a/python/setup.cfg b/python/setup.cfg index 9a7b1965..d67bb325 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -1,5 +1,5 @@ [metadata] -version = 1.9.9 +version = 1.9.10 [aliases] test=pytest diff --git a/python/setup.py b/python/setup.py index 3542be44..d34e57e7 100644 --- a/python/setup.py +++ b/python/setup.py @@ -104,9 +104,12 @@ def src(x): 'License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)', 'Natural Language :: English', 'Programming Language :: Python', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', 'Topic :: Scientific/Engineering', 'Topic :: Scientific/Engineering :: Physics', 'Topic :: Software Development :: Libraries', diff --git a/python/test/segy.py b/python/test/segy.py index a180d900..376f8164 100644 --- a/python/test/segy.py +++ b/python/test/segy.py @@ -1075,7 +1075,7 @@ def test_assign_all_traces(small): def test_traceaccess_from_array(): - a = np.arange(10, dtype=np.int) + a = np.arange(10, dtype=int) b = np.arange(10, dtype=np.int32) c = np.arange(10, dtype=np.int64) d = np.arange(10, dtype=np.intc)