Skip to content

Commit

Permalink
Prepare to release google-re2 1.1.
Browse files Browse the repository at this point in the history
Drop support for Python 3.7.
Add support for macOS 13.
Add support for Windows 32-bit.
Use `delvewheel` on Windows.

Fixes #438.

Change-Id: I003e808089abe5bb5dfa77521c1cd9d18f749bfb
Reviewed-on: https://code-review.googlesource.com/c/re2/+/61570
Reviewed-by: Paul Wankadia <[email protected]>
Reviewed-by: Alex Chernyakhovsky <[email protected]>
  • Loading branch information
junyer committed Jul 28, 2023
1 parent e664633 commit 4c70d0f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- { name: X64, python-name: x86_64, runs-on: [ubuntu-latest] }
- { name: ARM64, python-name: aarch64, runs-on: [self-hosted, linux, arm64] }
os: [manylinux2014, manylinux_2_28]
ver: ['3.7', '3.8', '3.9', '3.10', '3.11']
ver: ['3.8', '3.9', '3.10', '3.11']
env:
BAZELISK_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
Expand Down Expand Up @@ -60,8 +60,8 @@ jobs:
arch:
- { name: X64, bazel-name: x86_64, python-name: x86_64 }
- { name: ARM64, bazel-name: arm64, python-name: arm64 }
os: [11, 12]
ver: ['3.7', '3.8', '3.9', '3.10', '3.11']
os: [11, 12, 13]
ver: ['3.8', '3.9', '3.10', '3.11']
env:
BAZELISK_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BAZEL_CPU: darwin_${{ matrix.arch.bazel-name }}
Expand Down Expand Up @@ -105,12 +105,13 @@ jobs:
fail-fast: false
matrix:
arch:
- { name: X64, bazel-name: x64, python-name: amd64 }
- { name: X86, bazel-name: x64_x86, python-name: win32 }
- { name: X64, bazel-name: x64, python-name: win_amd64 }
# FIXME: Compiling succeeds, but linking fails with an error like
# "LINK : fatal error LNK1104: cannot open file 'python311.lib'".
# Maybe we will need GitHub-hosted runners for Windows on ARM64?!
# - { name: ARM64, bazel-name: arm64, python-name: arm64 }
ver: ['3.7', '3.8', '3.9', '3.10', '3.11']
# - { name: ARM64, bazel-name: arm64, python-name: win_arm64 }
ver: ['3.8', '3.9', '3.10', '3.11']
env:
BAZELISK_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BAZEL_CPU: ${{ matrix.arch.bazel-name }}_windows
Expand All @@ -122,14 +123,14 @@ jobs:
- name: Prepare Python ${{ matrix.ver }} environment
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade wheel
python -m pip install --upgrade wheel delvewheel
python -m pip install --upgrade absl-py
shell: bash
- name: Build wheel
run: |
python setup.py bdist_wheel \
--plat-name=win_${{ matrix.arch.python-name }}
cp dist/* .
--plat-name=${{ matrix.arch.python-name }}
python -m delvewheel --wheel-dir=. dist/*
shell: bash
working-directory: python
- if: matrix.arch.name == runner.arch
Expand Down
6 changes: 3 additions & 3 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def include_dirs():

setuptools.setup(
name='google-re2',
version='1.0',
version='1.1',
description='RE2 Python bindings',
long_description=long_description,
long_description_content_type='text/plain',
Expand All @@ -98,8 +98,8 @@ def include_dirs():
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: C++',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
],
cmdclass={'build_ext': BuildExt},
python_requires='~=3.7',
python_requires='~=3.8',
)

0 comments on commit 4c70d0f

Please sign in to comment.