Commit Graph

35 Commits

Author SHA1 Message Date
Russ Cox
ed708ebe3a re2: prepare to tag 2025-08-12
2025-08-12 will be the same as 2025-08-05
except for having some Bazel-related fixes
and possibly the right files to automatically
push an update to the Bazel Central Registry.

Change-Id: I178dd5ab31eeb29c97d9f687cbe7553d02dca8cb
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63910
Reviewed-by: Russ Cox <rsc@swtch.com>
Reviewed-by: Jeremy Kun <jkun@google.com>
2025-08-12 12:24:28 -07:00
Russ Cox
85c7c0fb11 re2: prepare to tag 2025-08-05
Change-Id: If340b5f8ac94c7f95115e736a486fc254b4cad96
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63832
Reviewed-by: Alan Donovan <adonovan@google.com>
2025-08-05 12:15:32 -07:00
Russ Cox
384a920737 python: require Python 3.9+
The module has been building wheels for Python 3.9 and later,
but setup.py still declared a minimum of 3.8.
Update the metadata to require 3.9.

Fixes #559.

Change-Id: Id5d06a006f5080529b69bfe163bf629e36b15c34
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63850
Reviewed-by: Alan Donovan <adonovan@google.com>
2025-08-05 10:48:02 -07:00
Russ Cox
6e8f5be3a3 python/setup: prepare for new version
Change-Id: I13884a2e5ff659d624b0617eda73a817d3489658
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63690
Reviewed-by: Alan Donovan <adonovan@google.com>
2025-07-22 08:30:50 -07:00
Russ Cox
8ea5841693 prepare release 2025-06-26
Blindly following https://code-review.googlesource.com/c/re2/+/63450.

Change-Id: I5cb128581275f4a4617a59eac76b9416e0166943
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63590
Reviewed-by: Alan Donovan <adonovan@google.com>
2025-06-26 10:57:25 -07:00
Paul Wankadia
6dcd83d60f Prepare to tag release 2024-07-02.
Change-Id: Ie5241f797412753c9e3a1fe47371c2b5e3d676ea
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63450
Reviewed-by: Paul Wankadia <junyer@google.com>
Reviewed-by: Aaron Jacobs <jacobsa@google.com>
2024-07-01 08:31:02 +00:00
Paul Wankadia
7314a11875 If we are building from the sdist, we are already in package form.
Fixes #500.

Change-Id: Ie13464dcb4bee249acc833d60b7fb15f65eeaf34
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63430
Reviewed-by: Alejandro Sedeño <asedeno@google.com>
Reviewed-by: Paul Wankadia <junyer@google.com>
2024-07-01 06:51:03 +00:00
Paul Wankadia
99b6b5c7d5 Prepare to tag release 2024-07-01.
Change-Id: I69d947db172debad79b7368d31d1215e571100a1
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63390
Reviewed-by: Perry Lorier <perryl@google.com>
Reviewed-by: Paul Wankadia <junyer@google.com>
2024-06-28 11:45:50 +00:00
Paul Wankadia
6144b62bec Fix a silly bug. Sigh.
Change-Id: Ia67342d56907053228895ed6cd65c98949bd7c43
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63352
Reviewed-by: Paul Wankadia <junyer@google.com>
Reviewed-by: Alex Chernyakhovsky <achernya@google.com>
2024-06-21 20:04:18 +00:00
Paul Wankadia
0d992b4cef Even more setting up to run mypy as per #496.
Change-Id: Ib1250ec954c0fecdaed606c41bbbbe00ff7bc1de
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63371
Reviewed-by: Paul Wankadia <junyer@google.com>
Reviewed-by: Alex Chernyakhovsky <achernya@google.com>
2024-06-21 19:50:31 +00:00
Paul Wankadia
10f876d273 More setting up to run mypy as per #496.
We need `re2` to be a package, not a module, because it appears that
modules can't have `.pyi` files, so munge the module into a package.

Change-Id: I1a268875743390c32c0fb9cd58f6d83a670ce928
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63270
Reviewed-by: Paul Wankadia <junyer@google.com>
Reviewed-by: Alex Chernyakhovsky <achernya@google.com>
2024-06-10 15:37:55 +00:00
Paul Wankadia
e29afa1844 Make the Bazel CI workflow use the local Python environment.
This is setting up to run mypy as per #496.

Change-Id: I48e67387313ac01d493086be8481b34f26bafe82
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63230
Reviewed-by: Alex Chernyakhovsky <achernya@google.com>
Reviewed-by: Paul Wankadia <junyer@google.com>
2024-06-08 15:04:42 +00:00
Paul Wankadia
1db129ff30 Prepare to tag release 2024-06-01.
Change-Id: Ic0d6aa382308afbf6ccbb6c34b7fa3575443875c
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63150
Reviewed-by: Alex Chernyakhovsky <achernya@google.com>
Reviewed-by: Paul Wankadia <junyer@google.com>
2024-05-30 20:10:50 +00:00
Paul Wankadia
fbb52d987e Prepare to tag release 2024-05-01.
Bump versions of actions and dependencies.

Change-Id: Ifb798e7c320b092e2faed2cd4d03fc962b8c009e
Reviewed-on: https://code-review.googlesource.com/c/re2/+/63010
Reviewed-by: Alex Chernyakhovsky <achernya@google.com>
Reviewed-by: Paul Wankadia <junyer@google.com>
2024-04-29 19:02:04 +00:00
Paul Wankadia
b84e3ff189 Bring back .YYYYMMDD suffixes for google-re2 versioning.
While I'm here, update @abseil-cpp to version 20240116.2.

Fixes #486.

Change-Id: I86ec3bd1860e2bd1424a67eb5590eaaa7cc4ea71
Reviewed-on: https://code-review.googlesource.com/c/re2/+/62990
Reviewed-by: Paul Wankadia <junyer@google.com>
Reviewed-by: Alex Chernyakhovsky <achernya@google.com>
2024-04-09 18:39:43 +00:00
Paul Wankadia
917047f360 Tell Bazel the specific target version of macOS too. Sigh.
Change-Id: I4f50d5299a0462d279042a2175995fff00ff97e4
Reviewed-on: https://code-review.googlesource.com/c/re2/+/62912
Reviewed-by: Paul Wankadia <junyer@google.com>
Reviewed-by: Jeff Bailey <jeffbailey@google.com>
2024-03-28 20:16:45 +00:00
Paul Wankadia
d00d1e9378 Avoid invalid escape sequence errors on Windows.
Change-Id: I3ed566fb37f235190b5fe91dfd07f575173a6aca
Reviewed-on: https://code-review.googlesource.com/c/re2/+/62711
Reviewed-by: Alex Chernyakhovsky <achernya@google.com>
Reviewed-by: Paul Wankadia <junyer@google.com>
2024-02-16 17:59:29 +00:00
Paul Wankadia
2aa303b697 Update @pybind11_bazel to version 2.11.1.bzl.2.
It now uses rules_python, which makes it drastically simpler
and also means that hermetic Python toolchains are used by
default. However, we want local Python toolchains to be used
when building wheels, so we have to do a little dance there.

Change-Id: I0dcd55522aca40aae0de0535439b714eeb85911a
Reviewed-on: https://code-review.googlesource.com/c/re2/+/62710
Reviewed-by: Alex Chernyakhovsky <achernya@google.com>
Reviewed-by: Paul Wankadia <junyer@google.com>
2024-02-16 17:34:48 +00:00
Paul Wankadia
bbfad95445 Register the local 32-bit C++ toolchain with highest priority.
Change-Id: I79d52e24ed00e875d1cfbb1f316139ad7639aff6
Reviewed-on: https://code-review.googlesource.com/c/re2/+/62470
Reviewed-by: Paul Wankadia <junyer@google.com>
Reviewed-by: Alex Chernyakhovsky <achernya@google.com>
2024-01-18 19:45:49 +00:00
Paul Wankadia
e6c83c9028 Alas, --extra_execution_platforms didn't help.
Change-Id: I84064688f4a46aed413ffea82f017290fc3f7a54
Reviewed-on: https://code-review.googlesource.com/c/re2/+/62450
Reviewed-by: Perry Lorier <perryl@google.com>
Reviewed-by: Paul Wankadia <junyer@google.com>
2024-01-18 11:17:04 +00:00
Paul Wankadia
70abe6b3b1 Attempt to convince Bazel 7 that X64 can build for X86.
Change-Id: I0b205639d1c71ccea7be88312a41defdc4207817
Reviewed-on: https://code-review.googlesource.com/c/re2/+/62430
Reviewed-by: Paul Wankadia <junyer@google.com>
Reviewed-by: Perry Lorier <perryl@google.com>
2024-01-18 10:08:26 +00:00
Paul Wankadia
8e719eef2f Print debug information during toolchain resolution.
Change-Id: I0785aa430af198635b9c4a193043a3798417acc8
Reviewed-on: https://code-review.googlesource.com/c/re2/+/62375
Reviewed-by: Alex Chernyakhovsky <achernya@google.com>
Reviewed-by: Paul Wankadia <junyer@google.com>
2024-01-16 19:51:36 +00:00
Paul Wankadia
95bb96b298 Register the local Python toolchain with highest priority.
Change-Id: I74f63bab5b0eab4296b1ed7dee9b98e76fdd3d64
Reviewed-on: https://code-review.googlesource.com/c/re2/+/62374
Reviewed-by: Paul Wankadia <junyer@google.com>
Reviewed-by: Alex Chernyakhovsky <achernya@google.com>
2024-01-16 19:07:59 +00:00
Paul Wankadia
c644d9aaec Try to get things working again with Bazel 7.
Specifically, try passing `--platforms` as well as `--cpu`.
(The latter is going away eventually, but keep it for now.)

Change-Id: Id53ba7b91008c7b90b1e9d242a3eded3e65007b8
Reviewed-on: https://code-review.googlesource.com/c/re2/+/62370
Reviewed-by: Paul Wankadia <junyer@google.com>
Reviewed-by: Alex Chernyakhovsky <achernya@google.com>
2024-01-16 15:35:06 +00:00
Paul Wankadia
a807e8a3aa Revert "Make the extension work for Python 3.8+."
This reverts commit 3a9939d2ae.

Reason for revert: pybind11 doesn't support `Py_LIMITED_API`;
as per https://github.com/pybind/pybind11/issues/1755, it has
probably never worked and it will probably never work.

Change-Id: Ie603151d31ad07a77d469f0050270d416fe8d21b
Reviewed-on: https://code-review.googlesource.com/c/re2/+/61872
Reviewed-by: Paul Wankadia <junyer@google.com>
Reviewed-by: Alex Chernyakhovsky <achernya@google.com>
2023-09-07 19:51:21 +00:00
Paul Wankadia
3a9939d2ae Make the extension work for Python 3.8+.
See https://docs.python.org/3/c-api/stable.html for background.

Accordingly, the build matrix no longer needs the Python version.

Change-Id: I36c0f0c399c54e1ea06011bbe1d4aa8afef4cf05
Reviewed-on: https://code-review.googlesource.com/c/re2/+/61871
Reviewed-by: Paul Wankadia <junyer@google.com>
Reviewed-by: Alex Chernyakhovsky <achernya@google.com>
2023-09-07 19:33:15 +00:00
Paul Wankadia
b1e4fdad75 Try plumbing the platform name a different way.
Change-Id: Ic13a6ff61ec445c73483d55241ff42d90f9470b1
Reviewed-on: https://code-review.googlesource.com/c/re2/+/61870
Reviewed-by: Alex Chernyakhovsky <achernya@google.com>
Reviewed-by: Paul Wankadia <junyer@google.com>
2023-09-07 17:56:13 +00:00
Paul Wankadia
44277d289e Try using bazelbuild/setup-bazelisk everywhere.
This should hopefully mean that the `bazel`
command found first in the path is actually
Bazelisk.

Revert various previous attempts to get all
this working...

Change-Id: I9a6267aff334de3dc55c7333d83e67ad2ad4ef05
Reviewed-on: https://code-review.googlesource.com/c/re2/+/61610
Reviewed-by: Perry Lorier <perryl@google.com>
Reviewed-by: Paul Wankadia <junyer@google.com>
2023-07-28 13:47:22 +00:00
Paul Wankadia
c20f76ecc5 Tell the Python build where Bazelisk is.
I have no idea what's going on with the
path on GitHub-hosted runners: the `bazelisk`
command works across platforms when called from
`bazel.sh` and also works on macOS when called
from the Python build, but fails on Linux and
Windows when called from the Python build.

Change-Id: I0447cf4a8eef5bd4318d0be7d44c31a357643c19
Reviewed-on: https://code-review.googlesource.com/c/re2/+/61592
Reviewed-by: Perry Lorier <perryl@google.com>
Reviewed-by: Paul Wankadia <junyer@google.com>
2023-07-28 12:41:09 +00:00
Paul Wankadia
8ad66d6df9 Explicitly invoke Bazelisk rather than Bazel.
Change-Id: Ic2fe3c5565bf798173f6f2edae2e4edfffc9a9b5
Reviewed-on: https://code-review.googlesource.com/c/re2/+/61591
Reviewed-by: Perry Lorier <perryl@google.com>
Reviewed-by: Paul Wankadia <junyer@google.com>
2023-07-28 11:19:26 +00:00
Paul Wankadia
4c70d0f310 Prepare to release google-re2 1.1.
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 <junyer@google.com>
Reviewed-by: Alex Chernyakhovsky <achernya@google.com>
2023-07-28 09:13:52 +00:00
Paul Wankadia
c53443c80d Tidy up the Python build a little.
Change-Id: I0b152cd0820df0e1e316dbc949e0548043a16600
Reviewed-on: https://code-review.googlesource.com/c/re2/+/61471
Reviewed-by: Alex Chernyakhovsky <achernya@google.com>
Reviewed-by: Paul Wankadia <junyer@google.com>
2023-06-30 13:55:41 +00:00
Paul Wankadia
03da4fc085 Use --enable_platform_specific_config in .bazelrc.
This magically applies the `linux`, `macos` or `windows` configuration
depending on the OS. Apart from simplifying things for us, this should
hopefully also unbreak the RE2 build that Bazel folks run in their CI.

Fixes #428.

Change-Id: I2f4192dd728661558a8c4c4c8dd68a720af3ff71
Reviewed-on: https://code-review.googlesource.com/c/re2/+/61370
Reviewed-by: Perry Lorier <perryl@google.com>
Reviewed-by: Paul Wankadia <junyer@google.com>
2023-05-26 10:20:28 +00:00
Paul Wankadia
6dbafa438b Try building the testing for RE2 with CMake again.
Benchmark on Ubuntu seems problematic with LTO, so... disable LTO.

GoogleTest on Windows makes MSVC's linker give "already defined in
testing.lib(exhaustive_tester.obj)" errors, so... frob the testing
library in the faint hope that the issue will finally be resolved.

Change-Id: Ib4237d44a12aa5bd2783d6b1285a5ccb14df4665
Reviewed-on: https://code-review.googlesource.com/c/re2/+/61330
Reviewed-by: Perry Lorier <perryl@google.com>
Reviewed-by: Paul Wankadia <junyer@google.com>
2023-05-19 09:23:50 +00:00
Paul Wankadia
af137a159d Copy over the app/ and python/ subdirectories.
As announced in mid April, RE2 will take a dependency on Abseil in the
`main` branch. This change is one of (quite probably) many that should
ultimately see the `abseil` branch removed.

Change-Id: I0ae5a6643f77d2ebf675443cea7cba558b8c7fef
Reviewed-on: https://code-review.googlesource.com/c/re2/+/61230
Reviewed-by: Alex Chernyakhovsky <achernya@google.com>
Reviewed-by: Paul Wankadia <junyer@google.com>
2023-05-15 18:28:19 +00:00