diff --git a/recipe/bld.bat b/recipe/bld.bat index dcc8863..617b288 100644 --- a/recipe/bld.bat +++ b/recipe/bld.bat @@ -9,7 +9,7 @@ set "PY_VER_NO_DOT=%PY_VER:.=%" sed -i "s/ SYSTEM_PYTHON_VERSION/ %PY_VER_NO_DOT%/g" python\dist\dist.bzl if %ERRORLEVEL% neq 0 exit 1 -sed -i "s;PYTHON_EXE;%PYTHON_CYGPATH%;g" %SRC_DIR%\bazel\system_python.bzl +sed -i "s;PYTHON_EXE;%PYTHON_CYGPATH%;g" %SRC_DIR%\python\dist\system_python.bzl if %ERRORLEVEL% neq 0 exit 1 cd python diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 4d62c68..2df4457 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,5 +1,5 @@ # keep this without major version to let the bot pick it up -{% set version = "26.1" %} +{% set version = "27.0" %} # protobuf doesn't add the major version in the tag, it's defined per language in # https://github.com/protocolbuffers/protobuf/blob/main/version.json {% set major = "5" %} @@ -12,7 +12,7 @@ package: source: - url: https://github.com/protocolbuffers/protobuf/archive/refs/tags/v{{ version }}.tar.gz - sha256: 4fc5ff1b2c339fb86cd3a25f0b5311478ab081e65ad258c6789359cd84d421f8 + sha256: da288bf1daa6c04d03a9051781caa52aceb9163586bff9aa6cfb12f69b9395aa patches: # backport https://github.com/protocolbuffers/protobuf/pull/17207 to avoid upb leakage - patches/0001-Make-our-Python-source-wheel-use-the-version-script-.patch @@ -36,7 +36,7 @@ source: sha256: 6eae8e7f28e1b68b833503d1a58caf139c11e52de19df0d787d974653a0ea4c6 # [build_platform == "win-64"] build: - number: 1 + number: 0 requirements: build: diff --git a/recipe/patches/0001-Make-our-Python-source-wheel-use-the-version-script-.patch b/recipe/patches/0001-Make-our-Python-source-wheel-use-the-version-script-.patch index b22aacf..68cf34d 100644 --- a/recipe/patches/0001-Make-our-Python-source-wheel-use-the-version-script-.patch +++ b/recipe/patches/0001-Make-our-Python-source-wheel-use-the-version-script-.patch @@ -1,4 +1,4 @@ -From 49d59cdd58b8332f425ff05f3f26de1c7e6ec0dd Mon Sep 17 00:00:00 2001 +From b231abcd3ee025baf8712a38060b93f4c8670572 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Fri, 21 Jun 2024 11:12:25 -0700 Subject: [PATCH 1/7] Make our Python source wheel use the version script to @@ -17,7 +17,7 @@ PiperOrigin-RevId: 645445353 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/python/BUILD.bazel b/python/BUILD.bazel -index 325a56b..0023876 100644 +index 3e34bbd..162c365 100644 --- a/python/BUILD.bazel +++ b/python/BUILD.bazel @@ -181,6 +181,8 @@ filegroup( @@ -30,10 +30,10 @@ index 325a56b..0023876 100644 name = "_message", srcs = [":message_srcs"], diff --git a/python/dist/BUILD.bazel b/python/dist/BUILD.bazel -index 03c44c0..861c558 100644 +index 265d9b8..5964ad3 100644 --- a/python/dist/BUILD.bazel +++ b/python/dist/BUILD.bazel -@@ -237,6 +237,7 @@ pkg_files( +@@ -238,6 +238,7 @@ pkg_files( srcs = [ "//:LICENSE", "//python:message_srcs", diff --git a/recipe/patches/0002-don-t-mark-windows-as-unsupported.patch b/recipe/patches/0002-don-t-mark-windows-as-unsupported.patch index 8daf698..79ca503 100644 --- a/recipe/patches/0002-don-t-mark-windows-as-unsupported.patch +++ b/recipe/patches/0002-don-t-mark-windows-as-unsupported.patch @@ -1,4 +1,4 @@ -From db32ea09fbfeeb90f1ea7895896eb9525da95671 Mon Sep 17 00:00:00 2001 +From a3b7ad9f8c66b4a7a5212f1662eaed8361ba5dfa Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 29 Jun 2024 09:49:55 +1100 Subject: [PATCH 2/7] don't mark windows as unsupported @@ -8,7 +8,7 @@ Subject: [PATCH 2/7] don't mark windows as unsupported 1 file changed, 1 deletion(-) diff --git a/python/BUILD.bazel b/python/BUILD.bazel -index 0023876..6155634 100644 +index 162c365..f2535de 100644 --- a/python/BUILD.bazel +++ b/python/BUILD.bazel @@ -137,7 +137,6 @@ selects.config_setting_group( diff --git a/recipe/patches/0003-don-t-link-statically-on-windows.patch b/recipe/patches/0003-don-t-link-statically-on-windows.patch index 4e3511e..81e001d 100644 --- a/recipe/patches/0003-don-t-link-statically-on-windows.patch +++ b/recipe/patches/0003-don-t-link-statically-on-windows.patch @@ -1,4 +1,4 @@ -From 0c21bb61424b39d704b11082f9a8060549bd31ed Mon Sep 17 00:00:00 2001 +From d01f133fdf29f3ce194439e66eda7bafbfb2331a Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sat, 29 Jun 2024 09:50:18 +1100 Subject: [PATCH 3/7] don't link statically on windows diff --git a/recipe/patches/0004-enable-windows-as-a-target-for-python-bindings.patch b/recipe/patches/0004-enable-windows-as-a-target-for-python-bindings.patch index 7309b89..5de0064 100644 --- a/recipe/patches/0004-enable-windows-as-a-target-for-python-bindings.patch +++ b/recipe/patches/0004-enable-windows-as-a-target-for-python-bindings.patch @@ -1,4 +1,4 @@ -From c674f7d8c33be5560bf5c8a12afbdab2c5025f81 Mon Sep 17 00:00:00 2001 +From 7494606a6d3e71ca7cf7cfe2e0d2c6fd1de8439c Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Sun, 14 Jul 2024 22:44:55 +1100 Subject: [PATCH 4/7] enable windows as a target for python bindings @@ -9,7 +9,7 @@ Subject: [PATCH 4/7] enable windows as a target for python bindings 2 files changed, 12 deletions(-) diff --git a/python/BUILD.bazel b/python/BUILD.bazel -index 6155634..c4f87f7 100644 +index f2535de..503a62a 100644 --- a/python/BUILD.bazel +++ b/python/BUILD.bazel @@ -135,21 +135,10 @@ selects.config_setting_group( @@ -35,10 +35,10 @@ index 6155634..c4f87f7 100644 name = "message_srcs", srcs = [ diff --git a/python/dist/BUILD.bazel b/python/dist/BUILD.bazel -index 861c558..d44b7a9 100644 +index 5964ad3..457302c 100644 --- a/python/dist/BUILD.bazel +++ b/python/dist/BUILD.bazel -@@ -345,7 +345,6 @@ py_wheel( +@@ -351,7 +351,6 @@ py_wheel( "src/", ], target_compatible_with = select({ diff --git a/recipe/patches/0005-Support-more-architectures-for-Python-bindings.patch b/recipe/patches/0005-Support-more-architectures-for-Python-bindings.patch index f900c56..56820e9 100644 --- a/recipe/patches/0005-Support-more-architectures-for-Python-bindings.patch +++ b/recipe/patches/0005-Support-more-architectures-for-Python-bindings.patch @@ -1,4 +1,4 @@ -From f16d7479f3ebbe93617682c80025b80dfe367ecb Mon Sep 17 00:00:00 2001 +From 081087b59a3c9242fb37fa03edb9a8a46628f34a Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Mon, 16 Sep 2024 11:49:04 +0200 Subject: [PATCH 5/7] Support more architectures for Python bindings @@ -9,10 +9,10 @@ Subject: [PATCH 5/7] Support more architectures for Python bindings 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/WORKSPACE b/WORKSPACE -index b7bc51c..16087fc 100644 +index 0e620de..2e3dc7c 100644 --- a/WORKSPACE +++ b/WORKSPACE -@@ -25,10 +25,10 @@ py_repositories() +@@ -29,10 +29,10 @@ py_repositories() http_archive( name = "platforms", urls = [ @@ -27,7 +27,7 @@ index b7bc51c..16087fc 100644 http_archive( diff --git a/python/dist/dist.bzl b/python/dist/dist.bzl -index 75c21c3..f28c1ce 100644 +index 061125e..9f9316f 100644 --- a/python/dist/dist.bzl +++ b/python/dist/dist.bzl @@ -5,12 +5,12 @@ load("@system_python//:version.bzl", "SYSTEM_PYTHON_VERSION") diff --git a/recipe/patches/0006-Compatible-windows-changes.patch b/recipe/patches/0006-Compatible-windows-changes.patch index 0876fd7..c363e69 100644 --- a/recipe/patches/0006-Compatible-windows-changes.patch +++ b/recipe/patches/0006-Compatible-windows-changes.patch @@ -1,4 +1,4 @@ -From b7835f5a9e88364af0bec5c0e5827eca30ec4d72 Mon Sep 17 00:00:00 2001 +From 5effba3160f4cad245f90e0f2ae69ba47dfdd7b9 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Tue, 17 Sep 2024 22:29:40 +0200 Subject: [PATCH 6/7] Compatible windows changes @@ -18,7 +18,7 @@ Subject: [PATCH 6/7] Compatible windows changes 11 files changed, 23 insertions(+), 19 deletions(-) diff --git a/python/BUILD.bazel b/python/BUILD.bazel -index c4f87f7..b29f7de 100644 +index 503a62a..03ce7f7 100644 --- a/python/BUILD.bazel +++ b/python/BUILD.bazel @@ -174,11 +174,12 @@ exports_files(["version_script.lds"]) @@ -38,7 +38,7 @@ index c4f87f7..b29f7de 100644 deps = [ "//third_party/utf8_range", diff --git a/python/descriptor.c b/python/descriptor.c -index 29ba6b3..d802767 100644 +index 7e121c4..9375ae2 100644 --- a/python/descriptor.c +++ b/python/descriptor.c @@ -23,7 +23,7 @@ @@ -100,10 +100,10 @@ index 05751a0..2b36cea 100644 const void* parent; // upb_MessageDef*, upb_DefPool*, etc. PyObject* parent_obj; // Python object that keeps parent alive, we own a ref. diff --git a/python/descriptor_pool.c b/python/descriptor_pool.c -index 089d31b..31817bb 100644 +index cb79f89..e20ba9a 100644 --- a/python/descriptor_pool.c +++ b/python/descriptor_pool.c -@@ -21,7 +21,7 @@ +@@ -22,7 +22,7 @@ // ----------------------------------------------------------------------------- typedef struct { @@ -135,7 +135,7 @@ index 34e1f9b..80ad1e9 100644 size_t iter; } PyUpb_ExtensionIterator; diff --git a/python/map.c b/python/map.c -index bbbd636..11f7a37 100644 +index 4b6e97e..8f808a3 100644 --- a/python/map.c +++ b/python/map.c @@ -18,7 +18,7 @@ @@ -147,7 +147,7 @@ index bbbd636..11f7a37 100644 PyObject* arena; // The field descriptor (upb_FieldDef*). // The low bit indicates whether the container is reified (see ptr below). -@@ -422,7 +422,7 @@ static PyType_Spec PyUpb_MessageMapContainer_Spec = { +@@ -420,7 +420,7 @@ static PyType_Spec PyUpb_MessageMapContainer_Spec = { // ----------------------------------------------------------------------------- typedef struct { @@ -157,10 +157,10 @@ index bbbd636..11f7a37 100644 size_t iter; int version; diff --git a/python/message.c b/python/message.c -index d394e6f..f873393 100644 +index c0c0882..4a86a0e 100644 --- a/python/message.c +++ b/python/message.c -@@ -176,7 +176,7 @@ err: +@@ -177,7 +177,7 @@ err: // The parent may also be non-present, in which case a mutation will trigger a // chain reaction. typedef struct PyUpb_Message { @@ -170,7 +170,7 @@ index d394e6f..f873393 100644 uintptr_t def; // Tagged, low bit 1 == upb_FieldDef*, else upb_MessageDef* union { diff --git a/python/protobuf.c b/python/protobuf.c -index 4f53154..bfe776f 100644 +index 316b1f6..4d1cf30 100644 --- a/python/protobuf.c +++ b/python/protobuf.c @@ -199,7 +199,7 @@ PyObject* PyUpb_ObjCache_Get(const void* key) { @@ -199,7 +199,7 @@ index 9a2828b..1bdea0b 100644 ( "//python/dist:osx_x86_64", diff --git a/python/repeated.c b/python/repeated.c -index 57e3479..98cb947 100644 +index 7940b4d..0f0904a 100644 --- a/python/repeated.c +++ b/python/repeated.c @@ -18,7 +18,7 @@ static PyObject* PyUpb_RepeatedScalarContainer_Append(PyObject* _self, diff --git a/recipe/patches/0007-Hacky-windows-workarounds.patch b/recipe/patches/0007-Hacky-windows-workarounds.patch index 5198666..660597f 100644 --- a/recipe/patches/0007-Hacky-windows-workarounds.patch +++ b/recipe/patches/0007-Hacky-windows-workarounds.patch @@ -1,18 +1,18 @@ -From 5d0eb7d0f4577782dcabb081ef35fe83dd3751d1 Mon Sep 17 00:00:00 2001 +From 0fe2a660d7592bfa0fbc7273a775d4b96812a01b Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Wed, 18 Sep 2024 11:54:27 +0200 Subject: [PATCH 7/7] Hacky windows workarounds --- - bazel/system_python.bzl | 6 +++--- - python/message.c | 2 +- - python/protobuf.c | 2 +- + python/dist/system_python.bzl | 6 +++--- + python/message.c | 2 +- + python/protobuf.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) -diff --git a/bazel/system_python.bzl b/bazel/system_python.bzl +diff --git a/python/dist/system_python.bzl b/python/dist/system_python.bzl index 29400be..45e7fd4 100644 ---- a/bazel/system_python.bzl -+++ b/bazel/system_python.bzl +--- a/python/dist/system_python.bzl ++++ b/python/dist/system_python.bzl @@ -160,12 +160,12 @@ def register_system_python(): def _get_python_version(repository_ctx): @@ -38,10 +38,10 @@ index 29400be..45e7fd4 100644 if path and python_version[0] == "3": diff --git a/python/message.c b/python/message.c -index f873393..3073e6c 100644 +index 4a86a0e..44e5857 100644 --- a/python/message.c +++ b/python/message.c -@@ -967,7 +967,7 @@ int PyUpb_Message_GetVersion(PyObject* _self) { +@@ -969,7 +969,7 @@ int PyUpb_Message_GetVersion(PyObject* _self) { * Attribute lookup must find both message fields and base class methods like * msg.SerializeToString(). */ @@ -51,10 +51,10 @@ index f873393..3073e6c 100644 PyUpb_Message* self = (void*)_self; diff --git a/python/protobuf.c b/python/protobuf.c -index bfe776f..681d9ff 100644 +index 4d1cf30..7f8ad88 100644 --- a/python/protobuf.c +++ b/python/protobuf.c -@@ -380,7 +380,7 @@ bool PyUpb_IndexToRange(PyObject* index, Py_ssize_t size, Py_ssize_t* i, +@@ -405,7 +405,7 @@ bool PyUpb_IndexToRange(PyObject* index, Py_ssize_t size, Py_ssize_t* i, // Module Entry Point // -----------------------------------------------------------------------------