Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] kore: fix build for Python 3.11 (not ready yet)
@ 2022-09-22  1:06 sgn
  2022-09-22  1:08 ` [PR PATCH] [Updated] " sgn
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: sgn @ 2022-09-22  1:06 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1259 bytes --]

There is a new pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages kore-python-3.11
https://github.com/void-linux/void-packages/pull/39413

kore: fix build for Python 3.11 (not ready yet)
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39413.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-kore-python-3.11-39413.patch --]
[-- Type: text/x-diff, Size: 2694 bytes --]

From 7c02d091329ae171486a37d38b18257dd131d32b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Thu, 22 Sep 2022 07:55:02 +0700
Subject: [PATCH] kore: fix build for Python 3.11 (not ready yet)

---
 srcpkgs/kore/patches/python-3.11.patch | 38 ++++++++++++++++++++++++++
 srcpkgs/kore/template                  | 11 ++------
 2 files changed, 41 insertions(+), 8 deletions(-)
 create mode 100644 srcpkgs/kore/patches/python-3.11.patch

diff --git a/srcpkgs/kore/patches/python-3.11.patch b/srcpkgs/kore/patches/python-3.11.patch
new file mode 100644
index 000000000000..8fbd080a3f9e
--- /dev/null
+++ b/srcpkgs/kore/patches/python-3.11.patch
@@ -0,0 +1,38 @@
+--- a/src/python.c
++++ b/src/python.c
+@@ -55,6 +55,10 @@
+ 
+ #include <frameobject.h>
+ 
++#if PY_VERSION_HEX >= 0x030B0000
++#include <internal/pycore_frame.h>
++#endif
++
+ #if PY_VERSION_HEX < 0x030A0000
+ typedef enum {
+ 	PYGEN_RETURN = 0,
+@@ -1192,8 +1196,8 @@ python_coro_trace(const char *label, str
+ 
+ 	gen = (PyGenObject *)coro->obj;
+ 
+-	if (gen->gi_frame != NULL && gen->gi_frame->f_code != NULL) {
+-		code = gen->gi_frame->f_code;
++	code = gen->gi_code;
++	if (code != NULL) {
+ 		func = PyUnicode_AsUTF8AndSize(code->co_name, NULL);
+ 		file = PyUnicode_AsUTF8AndSize(code->co_filename, NULL);
+ 
+@@ -1206,8 +1210,13 @@ python_coro_trace(const char *label, str
+ 		fname = "unknown";
+ 	}
+ 
++#if PY_VERSION_HEX <= 0x030B0000
+ 	if (gen->gi_frame != NULL)
+ 		line = PyFrame_GetLineNumber(gen->gi_frame);
++#else
++	if (code != NULL)
++		line = PyCode_Addr2Line(code, 0);
++#endif
+ 	else
+ 		line = -1;
+ 
diff --git a/srcpkgs/kore/template b/srcpkgs/kore/template
index 715f92118e9d..635b52ba53c8 100644
--- a/srcpkgs/kore/template
+++ b/srcpkgs/kore/template
@@ -1,13 +1,13 @@
 # Template file for 'kore'
 pkgname=kore
 version=4.2.3
-revision=1
+revision=2
 # arch specific seccomp stuff
 archs="x86_64* aarch64* ppc64*"
 build_style=gnu-makefile
 make_use_env=yes
-make_build_args="CURL=1 TASKS=1 PGSQL=1 JSONRPC=1 ACME=1"
-hostmakedepends="postgresql-libs-devel"
+make_build_args="CURL=1 TASKS=1 PGSQL=1 JSONRPC=1 ACME=1 PYTHON=1"
+hostmakedepends="postgresql-libs-devel python3-devel"
 makedepends="openssl-devel libcurl-devel postgresql-libs-devel yajl-devel"
 short_desc="Easy to use web platform for writing scalable web APIs in C"
 maintainer="Helmut Pozimski <helmut@pozimski.eu>"
@@ -23,11 +23,6 @@ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	makedepends+=" musl-legacy-compat"
 fi
 
-if [ -z "$CROSS_BUILD" ]; then
-	makedepends+=" python3-devel"
-	make_build_args+=" PYTHON=1"
-fi
-
 post_install() {
 	vlicense LICENSE
 }

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] kore: fix build for Python 3.11 (not ready yet)
  2022-09-22  1:06 [PR PATCH] kore: fix build for Python 3.11 (not ready yet) sgn
@ 2022-09-22  1:08 ` sgn
  2022-09-22  8:24 ` sgn
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: sgn @ 2022-09-22  1:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1264 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages kore-python-3.11
https://github.com/void-linux/void-packages/pull/39413

kore: fix build for Python 3.11 (not ready yet)
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39413.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-kore-python-3.11-39413.patch --]
[-- Type: text/x-diff, Size: 2604 bytes --]

From cf782f65f4418312aaef74b212ac3d0303deab0a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Thu, 22 Sep 2022 07:55:02 +0700
Subject: [PATCH] kore: fix build for Python 3.11 (not ready yet)

---
 srcpkgs/kore/patches/python-3.11.patch | 29 ++++++++++++++++++++++++++
 srcpkgs/kore/template                  | 11 +++-------
 2 files changed, 32 insertions(+), 8 deletions(-)
 create mode 100644 srcpkgs/kore/patches/python-3.11.patch

diff --git a/srcpkgs/kore/patches/python-3.11.patch b/srcpkgs/kore/patches/python-3.11.patch
new file mode 100644
index 000000000000..c5c2579d200c
--- /dev/null
+++ b/srcpkgs/kore/patches/python-3.11.patch
@@ -0,0 +1,29 @@
+diff --git a/src/python.c b/src/python.c
+index ab0f3c6..526d443 100644
+--- a/src/python.c
++++ b/src/python.c
+@@ -1192,8 +1192,8 @@ python_coro_trace(const char *label, struct python_coro *coro)
+ 
+ 	gen = (PyGenObject *)coro->obj;
+ 
+-	if (gen->gi_frame != NULL && gen->gi_frame->f_code != NULL) {
+-		code = gen->gi_frame->f_code;
++	code = gen->gi_code;
++	if (code != NULL) {
+ 		func = PyUnicode_AsUTF8AndSize(code->co_name, NULL);
+ 		file = PyUnicode_AsUTF8AndSize(code->co_filename, NULL);
+ 
+@@ -1206,8 +1206,13 @@ python_coro_trace(const char *label, struct python_coro *coro)
+ 		fname = "unknown";
+ 	}
+ 
++#if PY_VERSION_HEX <= 0x030B0000
+ 	if (gen->gi_frame != NULL)
+ 		line = PyFrame_GetLineNumber(gen->gi_frame);
++#else
++	if (code != NULL)
++		line = PyCode_Addr2Line(code, 0);
++#endif
+ 	else
+ 		line = -1;
+ 
diff --git a/srcpkgs/kore/template b/srcpkgs/kore/template
index 715f92118e9d..635b52ba53c8 100644
--- a/srcpkgs/kore/template
+++ b/srcpkgs/kore/template
@@ -1,13 +1,13 @@
 # Template file for 'kore'
 pkgname=kore
 version=4.2.3
-revision=1
+revision=2
 # arch specific seccomp stuff
 archs="x86_64* aarch64* ppc64*"
 build_style=gnu-makefile
 make_use_env=yes
-make_build_args="CURL=1 TASKS=1 PGSQL=1 JSONRPC=1 ACME=1"
-hostmakedepends="postgresql-libs-devel"
+make_build_args="CURL=1 TASKS=1 PGSQL=1 JSONRPC=1 ACME=1 PYTHON=1"
+hostmakedepends="postgresql-libs-devel python3-devel"
 makedepends="openssl-devel libcurl-devel postgresql-libs-devel yajl-devel"
 short_desc="Easy to use web platform for writing scalable web APIs in C"
 maintainer="Helmut Pozimski <helmut@pozimski.eu>"
@@ -23,11 +23,6 @@ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	makedepends+=" musl-legacy-compat"
 fi
 
-if [ -z "$CROSS_BUILD" ]; then
-	makedepends+=" python3-devel"
-	make_build_args+=" PYTHON=1"
-fi
-
 post_install() {
 	vlicense LICENSE
 }

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] kore: fix build for Python 3.11 (not ready yet)
  2022-09-22  1:06 [PR PATCH] kore: fix build for Python 3.11 (not ready yet) sgn
  2022-09-22  1:08 ` [PR PATCH] [Updated] " sgn
@ 2022-09-22  8:24 ` sgn
  2022-09-22 10:20 ` sgn
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: sgn @ 2022-09-22  8:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1264 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages kore-python-3.11
https://github.com/void-linux/void-packages/pull/39413

kore: fix build for Python 3.11 (not ready yet)
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39413.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-kore-python-3.11-39413.patch --]
[-- Type: text/x-diff, Size: 2630 bytes --]

From 40f63f3b69772b48b5f575726bc013b89934ed3f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Thu, 22 Sep 2022 07:55:02 +0700
Subject: [PATCH] kore: fix build for Python 3.11 (not ready yet)

---
 srcpkgs/kore/patches/python-3.11.patch | 35 ++++++++++++++++++++++++++
 srcpkgs/kore/template                  |  9 ++-----
 2 files changed, 37 insertions(+), 7 deletions(-)
 create mode 100644 srcpkgs/kore/patches/python-3.11.patch

diff --git a/srcpkgs/kore/patches/python-3.11.patch b/srcpkgs/kore/patches/python-3.11.patch
new file mode 100644
index 000000000000..8dce13b7bd4d
--- /dev/null
+++ b/srcpkgs/kore/patches/python-3.11.patch
@@ -0,0 +1,35 @@
+diff --git a/src/python.c b/src/python.c
+index ab0f3c6..526d443 100644
+--- a/src/python.c
++++ b/src/python.c
+@@ -1192,8 +1192,14 @@ python_coro_trace(const char *label, struct python_coro *coro)
+ 
+ 	gen = (PyGenObject *)coro->obj;
+ 
+-	if (gen->gi_frame != NULL && gen->gi_frame->f_code != NULL) {
+-		code = gen->gi_frame->f_code;
++#if PY_VERSION_HEX <= 0x030B0000
++	code = NULL;
++	if (gen->gi_frame != NULL)
++		code = gen->gi_frame->f_code
++#else
++	code = gen->gi_code;
++#endif
++	if (code != NULL) {
+ 		func = PyUnicode_AsUTF8AndSize(code->co_name, NULL);
+ 		file = PyUnicode_AsUTF8AndSize(code->co_filename, NULL);
+ 
+@@ -1206,8 +1206,13 @@ python_coro_trace(const char *label, struct python_coro *coro)
+ 		fname = "unknown";
+ 	}
+ 
++#if PY_VERSION_HEX <= 0x030B0000
+ 	if (gen->gi_frame != NULL)
+ 		line = PyFrame_GetLineNumber(gen->gi_frame);
++#else
++	if (code != NULL)
++		line = PyCode_Addr2Line(code, 0);
++#endif
+ 	else
+ 		line = -1;
+ 
diff --git a/srcpkgs/kore/template b/srcpkgs/kore/template
index 715f92118e9d..a142ad8439be 100644
--- a/srcpkgs/kore/template
+++ b/srcpkgs/kore/template
@@ -6,8 +6,8 @@ revision=1
 archs="x86_64* aarch64* ppc64*"
 build_style=gnu-makefile
 make_use_env=yes
-make_build_args="CURL=1 TASKS=1 PGSQL=1 JSONRPC=1 ACME=1"
-hostmakedepends="postgresql-libs-devel"
+make_build_args="CURL=1 TASKS=1 PGSQL=1 JSONRPC=1 ACME=1 PYTHON=1"
+hostmakedepends="postgresql-libs-devel python3-devel"
 makedepends="openssl-devel libcurl-devel postgresql-libs-devel yajl-devel"
 short_desc="Easy to use web platform for writing scalable web APIs in C"
 maintainer="Helmut Pozimski <helmut@pozimski.eu>"
@@ -23,11 +23,6 @@ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	makedepends+=" musl-legacy-compat"
 fi
 
-if [ -z "$CROSS_BUILD" ]; then
-	makedepends+=" python3-devel"
-	make_build_args+=" PYTHON=1"
-fi
-
 post_install() {
 	vlicense LICENSE
 }

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] kore: fix build for Python 3.11 (not ready yet)
  2022-09-22  1:06 [PR PATCH] kore: fix build for Python 3.11 (not ready yet) sgn
  2022-09-22  1:08 ` [PR PATCH] [Updated] " sgn
  2022-09-22  8:24 ` sgn
@ 2022-09-22 10:20 ` sgn
  2022-09-22 10:51 ` [PR REVIEW] " ahesford
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: sgn @ 2022-09-22 10:20 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1264 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages kore-python-3.11
https://github.com/void-linux/void-packages/pull/39413

kore: fix build for Python 3.11 (not ready yet)
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39413.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-kore-python-3.11-39413.patch --]
[-- Type: text/x-diff, Size: 2734 bytes --]

From 1ce54dc6cbeb986dcaba9517f81721ab856bac9e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Thu, 22 Sep 2022 07:55:02 +0700
Subject: [PATCH] kore: fix build for Python 3.11 (not ready yet)

---
 srcpkgs/kore/patches/python-3.11.patch | 35 ++++++++++++++++++++++++++
 srcpkgs/kore/template                  | 12 +++------
 2 files changed, 39 insertions(+), 8 deletions(-)
 create mode 100644 srcpkgs/kore/patches/python-3.11.patch

diff --git a/srcpkgs/kore/patches/python-3.11.patch b/srcpkgs/kore/patches/python-3.11.patch
new file mode 100644
index 000000000000..8dce13b7bd4d
--- /dev/null
+++ b/srcpkgs/kore/patches/python-3.11.patch
@@ -0,0 +1,35 @@
+diff --git a/src/python.c b/src/python.c
+index ab0f3c6..526d443 100644
+--- a/src/python.c
++++ b/src/python.c
+@@ -1192,8 +1192,14 @@ python_coro_trace(const char *label, struct python_coro *coro)
+ 
+ 	gen = (PyGenObject *)coro->obj;
+ 
+-	if (gen->gi_frame != NULL && gen->gi_frame->f_code != NULL) {
+-		code = gen->gi_frame->f_code;
++#if PY_VERSION_HEX <= 0x030B0000
++	code = NULL;
++	if (gen->gi_frame != NULL)
++		code = gen->gi_frame->f_code
++#else
++	code = gen->gi_code;
++#endif
++	if (code != NULL) {
+ 		func = PyUnicode_AsUTF8AndSize(code->co_name, NULL);
+ 		file = PyUnicode_AsUTF8AndSize(code->co_filename, NULL);
+ 
+@@ -1206,8 +1206,13 @@ python_coro_trace(const char *label, struct python_coro *coro)
+ 		fname = "unknown";
+ 	}
+ 
++#if PY_VERSION_HEX <= 0x030B0000
+ 	if (gen->gi_frame != NULL)
+ 		line = PyFrame_GetLineNumber(gen->gi_frame);
++#else
++	if (code != NULL)
++		line = PyCode_Addr2Line(code, 0);
++#endif
+ 	else
+ 		line = -1;
+ 
diff --git a/srcpkgs/kore/template b/srcpkgs/kore/template
index 715f92118e9d..ab8893bf8a09 100644
--- a/srcpkgs/kore/template
+++ b/srcpkgs/kore/template
@@ -6,9 +6,10 @@ revision=1
 archs="x86_64* aarch64* ppc64*"
 build_style=gnu-makefile
 make_use_env=yes
-make_build_args="CURL=1 TASKS=1 PGSQL=1 JSONRPC=1 ACME=1"
-hostmakedepends="postgresql-libs-devel"
-makedepends="openssl-devel libcurl-devel postgresql-libs-devel yajl-devel"
+make_build_args="CURL=1 TASKS=1 PGSQL=1 JSONRPC=1 ACME=1 PYTHON=1"
+hostmakedepends="postgresql-libs-devel python3"
+makedepends="openssl-devel libcurl-devel postgresql-libs-devel yajl-devel
+ python3-devel"
 short_desc="Easy to use web platform for writing scalable web APIs in C"
 maintainer="Helmut Pozimski <helmut@pozimski.eu>"
 license="ISC"
@@ -23,11 +24,6 @@ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	makedepends+=" musl-legacy-compat"
 fi
 
-if [ -z "$CROSS_BUILD" ]; then
-	makedepends+=" python3-devel"
-	make_build_args+=" PYTHON=1"
-fi
-
 post_install() {
 	vlicense LICENSE
 }

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR REVIEW] kore: fix build for Python 3.11 (not ready yet)
  2022-09-22  1:06 [PR PATCH] kore: fix build for Python 3.11 (not ready yet) sgn
                   ` (2 preceding siblings ...)
  2022-09-22 10:20 ` sgn
@ 2022-09-22 10:51 ` ahesford
  2022-09-22 10:55 ` [PR PATCH] [Updated] " sgn
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ahesford @ 2022-09-22 10:51 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 184 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/39413#discussion_r977504982

Comment:
Shouldn't the be strictly less than?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] kore: fix build for Python 3.11 (not ready yet)
  2022-09-22  1:06 [PR PATCH] kore: fix build for Python 3.11 (not ready yet) sgn
                   ` (3 preceding siblings ...)
  2022-09-22 10:51 ` [PR REVIEW] " ahesford
@ 2022-09-22 10:55 ` sgn
  2022-09-22 11:02 ` sgn
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: sgn @ 2022-09-22 10:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1264 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages kore-python-3.11
https://github.com/void-linux/void-packages/pull/39413

kore: fix build for Python 3.11 (not ready yet)
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39413.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-kore-python-3.11-39413.patch --]
[-- Type: text/x-diff, Size: 2734 bytes --]

From 5c807b7080faed77521531547e9a13f7635a6bb6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Thu, 22 Sep 2022 07:55:02 +0700
Subject: [PATCH] kore: fix build for Python 3.11 (not ready yet)

---
 srcpkgs/kore/patches/python-3.11.patch | 35 ++++++++++++++++++++++++++
 srcpkgs/kore/template                  | 12 +++------
 2 files changed, 39 insertions(+), 8 deletions(-)
 create mode 100644 srcpkgs/kore/patches/python-3.11.patch

diff --git a/srcpkgs/kore/patches/python-3.11.patch b/srcpkgs/kore/patches/python-3.11.patch
new file mode 100644
index 000000000000..899679ef082c
--- /dev/null
+++ b/srcpkgs/kore/patches/python-3.11.patch
@@ -0,0 +1,35 @@
+diff --git a/src/python.c b/src/python.c
+index ab0f3c6..526d443 100644
+--- a/src/python.c
++++ b/src/python.c
+@@ -1192,8 +1192,14 @@ python_coro_trace(const char *label, struct python_coro *coro)
+ 
+ 	gen = (PyGenObject *)coro->obj;
+ 
+-	if (gen->gi_frame != NULL && gen->gi_frame->f_code != NULL) {
+-		code = gen->gi_frame->f_code;
++#if PY_VERSION_HEX < 0x030B0000
++	code = NULL;
++	if (gen->gi_frame != NULL)
++		code = gen->gi_frame->f_code;
++#else
++	code = gen->gi_code;
++#endif
++	if (code != NULL) {
+ 		func = PyUnicode_AsUTF8AndSize(code->co_name, NULL);
+ 		file = PyUnicode_AsUTF8AndSize(code->co_filename, NULL);
+ 
+@@ -1206,8 +1206,13 @@ python_coro_trace(const char *label, struct python_coro *coro)
+ 		fname = "unknown";
+ 	}
+ 
++#if PY_VERSION_HEX <= 0x030B0000
+ 	if (gen->gi_frame != NULL)
+ 		line = PyFrame_GetLineNumber(gen->gi_frame);
++#else
++	if (code != NULL)
++		line = PyCode_Addr2Line(code, 0);
++#endif
+ 	else
+ 		line = -1;
+ 
diff --git a/srcpkgs/kore/template b/srcpkgs/kore/template
index 715f92118e9d..ab8893bf8a09 100644
--- a/srcpkgs/kore/template
+++ b/srcpkgs/kore/template
@@ -6,9 +6,10 @@ revision=1
 archs="x86_64* aarch64* ppc64*"
 build_style=gnu-makefile
 make_use_env=yes
-make_build_args="CURL=1 TASKS=1 PGSQL=1 JSONRPC=1 ACME=1"
-hostmakedepends="postgresql-libs-devel"
-makedepends="openssl-devel libcurl-devel postgresql-libs-devel yajl-devel"
+make_build_args="CURL=1 TASKS=1 PGSQL=1 JSONRPC=1 ACME=1 PYTHON=1"
+hostmakedepends="postgresql-libs-devel python3"
+makedepends="openssl-devel libcurl-devel postgresql-libs-devel yajl-devel
+ python3-devel"
 short_desc="Easy to use web platform for writing scalable web APIs in C"
 maintainer="Helmut Pozimski <helmut@pozimski.eu>"
 license="ISC"
@@ -23,11 +24,6 @@ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	makedepends+=" musl-legacy-compat"
 fi
 
-if [ -z "$CROSS_BUILD" ]; then
-	makedepends+=" python3-devel"
-	make_build_args+=" PYTHON=1"
-fi
-
 post_install() {
 	vlicense LICENSE
 }

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] kore: fix build for Python 3.11 (not ready yet)
  2022-09-22  1:06 [PR PATCH] kore: fix build for Python 3.11 (not ready yet) sgn
                   ` (4 preceding siblings ...)
  2022-09-22 10:55 ` [PR PATCH] [Updated] " sgn
@ 2022-09-22 11:02 ` sgn
  2022-09-22 13:49 ` [PR REVIEW] " ahesford
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: sgn @ 2022-09-22 11:02 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1264 bytes --]

There is an updated pull request by sgn against master on the void-packages repository

https://github.com/sgn/void-packages kore-python-3.11
https://github.com/void-linux/void-packages/pull/39413

kore: fix build for Python 3.11 (not ready yet)
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/39413.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-kore-python-3.11-39413.patch --]
[-- Type: text/x-diff, Size: 2750 bytes --]

From 67139759d7d1824419947ccb574d0461f200ed6b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Thu, 22 Sep 2022 07:55:02 +0700
Subject: [PATCH] kore: fix build for Python 3.11 (not ready yet)

---
 srcpkgs/kore/patches/python-3.11.patch | 35 ++++++++++++++++++++++++++
 srcpkgs/kore/template                  | 12 ++++-----
 2 files changed, 40 insertions(+), 7 deletions(-)
 create mode 100644 srcpkgs/kore/patches/python-3.11.patch

diff --git a/srcpkgs/kore/patches/python-3.11.patch b/srcpkgs/kore/patches/python-3.11.patch
new file mode 100644
index 000000000000..899679ef082c
--- /dev/null
+++ b/srcpkgs/kore/patches/python-3.11.patch
@@ -0,0 +1,35 @@
+diff --git a/src/python.c b/src/python.c
+index ab0f3c6..526d443 100644
+--- a/src/python.c
++++ b/src/python.c
+@@ -1192,8 +1192,14 @@ python_coro_trace(const char *label, struct python_coro *coro)
+ 
+ 	gen = (PyGenObject *)coro->obj;
+ 
+-	if (gen->gi_frame != NULL && gen->gi_frame->f_code != NULL) {
+-		code = gen->gi_frame->f_code;
++#if PY_VERSION_HEX < 0x030B0000
++	code = NULL;
++	if (gen->gi_frame != NULL)
++		code = gen->gi_frame->f_code;
++#else
++	code = gen->gi_code;
++#endif
++	if (code != NULL) {
+ 		func = PyUnicode_AsUTF8AndSize(code->co_name, NULL);
+ 		file = PyUnicode_AsUTF8AndSize(code->co_filename, NULL);
+ 
+@@ -1206,8 +1206,13 @@ python_coro_trace(const char *label, struct python_coro *coro)
+ 		fname = "unknown";
+ 	}
+ 
++#if PY_VERSION_HEX <= 0x030B0000
+ 	if (gen->gi_frame != NULL)
+ 		line = PyFrame_GetLineNumber(gen->gi_frame);
++#else
++	if (code != NULL)
++		line = PyCode_Addr2Line(code, 0);
++#endif
+ 	else
+ 		line = -1;
+ 
diff --git a/srcpkgs/kore/template b/srcpkgs/kore/template
index 715f92118e9d..9128432317a3 100644
--- a/srcpkgs/kore/template
+++ b/srcpkgs/kore/template
@@ -6,9 +6,10 @@ revision=1
 archs="x86_64* aarch64* ppc64*"
 build_style=gnu-makefile
 make_use_env=yes
-make_build_args="CURL=1 TASKS=1 PGSQL=1 JSONRPC=1 ACME=1"
-hostmakedepends="postgresql-libs-devel"
-makedepends="openssl-devel libcurl-devel postgresql-libs-devel yajl-devel"
+make_build_args="CURL=1 TASKS=1 PGSQL=1 JSONRPC=1 ACME=1 PYTHON=1"
+hostmakedepends="postgresql-libs-devel python3"
+makedepends="openssl-devel libcurl-devel postgresql-libs-devel yajl-devel
+ python3-devel"
 short_desc="Easy to use web platform for writing scalable web APIs in C"
 maintainer="Helmut Pozimski <helmut@pozimski.eu>"
 license="ISC"
@@ -23,10 +24,7 @@ if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
 	makedepends+=" musl-legacy-compat"
 fi
 
-if [ -z "$CROSS_BUILD" ]; then
-	makedepends+=" python3-devel"
-	make_build_args+=" PYTHON=1"
-fi
+LDFLAGS=-lpython3
 
 post_install() {
 	vlicense LICENSE

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR REVIEW] kore: fix build for Python 3.11 (not ready yet)
  2022-09-22  1:06 [PR PATCH] kore: fix build for Python 3.11 (not ready yet) sgn
                   ` (5 preceding siblings ...)
  2022-09-22 11:02 ` sgn
@ 2022-09-22 13:49 ` ahesford
  2022-09-26 14:18 ` sgn
  2022-09-26 14:18 ` [PR PATCH] [Closed]: " sgn
  8 siblings, 0 replies; 10+ messages in thread
From: ahesford @ 2022-09-22 13:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 550 bytes --]

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/39413#discussion_r977681846

Comment:
It turns out that my previous recommendation for strictly less than is irrelevant because the release version will be `0x030B0F00` and the current RC should be `0x030B0C02`, so both are greater than the cutoff anyway. I misread the explanation of the hex versioning scheme and expected the release to be 0x30B00000`.

I'd say make this strictly less than for consistency and mathematical correctness.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: kore: fix build for Python 3.11 (not ready yet)
  2022-09-22  1:06 [PR PATCH] kore: fix build for Python 3.11 (not ready yet) sgn
                   ` (6 preceding siblings ...)
  2022-09-22 13:49 ` [PR REVIEW] " ahesford
@ 2022-09-26 14:18 ` sgn
  2022-09-26 14:18 ` [PR PATCH] [Closed]: " sgn
  8 siblings, 0 replies; 10+ messages in thread
From: sgn @ 2022-09-26 14:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 202 bytes --]

New comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/39413#issuecomment-1258111633

Comment:
Imported upstream patch da644a0aa97ade7f6c045ceb0919bb47f9daf450

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Closed]: kore: fix build for Python 3.11 (not ready yet)
  2022-09-22  1:06 [PR PATCH] kore: fix build for Python 3.11 (not ready yet) sgn
                   ` (7 preceding siblings ...)
  2022-09-26 14:18 ` sgn
@ 2022-09-26 14:18 ` sgn
  8 siblings, 0 replies; 10+ messages in thread
From: sgn @ 2022-09-26 14:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1107 bytes --]

There's a closed pull request on the void-packages repository

kore: fix build for Python 3.11 (not ready yet)
https://github.com/void-linux/void-packages/pull/39413

Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **NO**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-09-26 14:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-22  1:06 [PR PATCH] kore: fix build for Python 3.11 (not ready yet) sgn
2022-09-22  1:08 ` [PR PATCH] [Updated] " sgn
2022-09-22  8:24 ` sgn
2022-09-22 10:20 ` sgn
2022-09-22 10:51 ` [PR REVIEW] " ahesford
2022-09-22 10:55 ` [PR PATCH] [Updated] " sgn
2022-09-22 11:02 ` sgn
2022-09-22 13:49 ` [PR REVIEW] " ahesford
2022-09-26 14:18 ` sgn
2022-09-26 14:18 ` [PR PATCH] [Closed]: " sgn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).